This is a plugin for the Ease task runner. It uses the typescript module to transpile TypeScript files.
npm install ease-task-typescript --save-dev
easeconfig.js:
const ts = require('ease-task-typescript');
module.exports = ease => {
ease.install('transpile-ts', ts, {});
};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.jsonfile, relative toeaseconfig.jsuseLocal: If true, the plugin will use the local TypeScript module instead of the one shipped (defaults tofalse).
If
tsconfigis present, all the compiler options will be ignored and loaded from the file instead. Keep in mind thatuseLocalwill only work wheneaseconfig.jsis sitting at the root (sibling tonode_modules).
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