ease-task-typescript

TypeScript compiler plugin for Ease task runner

Usage no npm install needed!

<script type="module">
  import easeTaskTypescript from 'https://cdn.skypack.dev/ease-task-typescript';
</script>

README

Ease Task Runner TypeScript Plugin

This is a plugin for the Ease task runner. It uses the typescript module to transpile TypeScript files.

Installation

npm install ease-task-typescript --save-dev

easeconfig.js:

const ts = require('ease-task-typescript');

module.exports = ease => {

  ease.install('transpile-ts', ts, {});

};

Configuration

This plugin takes a config object similar to TypeScript Compiler Options while adding the following properties:

  • cleanOutDir: Boolean indicating if the output directory should be emptied first
  • tsconfig: A path to the tsconfig.json file, relative to easeconfig.js

If tsconfig is present, all the compiler options will be ignored and loaded from the file instead.

Example

easeconfig.js:

const ts = require('ease-task-typescript');

module.exports = ease => {

  ease.install('transpile-ts', ts, {
    cleanOutDir: true,
    tsconfig: 'tsconfig.json'
  });

  ease.job('transpile-ts-files', ['transpile-ts']);

};

CLI:

ease transpile-ts-files