ease-task-typescript
v1.1.0
Published
TypeScript compiler plugin for Ease task runner
Downloads
1
Maintainers
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 firsttsconfig
: A path to thetsconfig.json
file, relative toeaseconfig.js
useLocal
: If true, the plugin will use the local TypeScript module instead of the one shipped (defaults tofalse
).
If
tsconfig
is present, all the compiler options will be ignored and loaded from the file instead. Keep in mind thatuseLocal
will only work wheneaseconfig.js
is sitting at the root (sibling tonode_modules
).
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