1.1.1 • Published 7 years ago

fly-typescript v1.1.1

Weekly downloads
9
License
MIT
Repository
github
Last release
7 years ago

fly-typescript

Typescript plugin for Fly

Install

npm install fly-typescript --save-dev

Usage

exports.scripts = function * (fly) {
  yield fly.source('src/**/*.ts').typescript({
    jsx: 'React',
    target: 'ES5',
    sourceMap: true,
    removeComments: true
  }).target('dist/js');
}

API

.typescript(options)

Unlike most plugins, this plugin provides access to all of Typescript's Transpile options. However, for the sake of simplicity, this plugin flattens all compilerOptions keys into the same object. In other words, we assume that you're providing compilerOptions, unless the given key matches the name of another TranspileOption.

Check out Typescript's Compile Options to see all Compiler options.

For example:

fly.source('...').typescript({ 
  moduleName: 'FooBar',
  compilerOptions: {
    module: 'System',
    sourceMap: true
  }
}).target('...');

// can be written as:

fly.source('...').typescript({ 
  moduleName: 'FooBar',
  module: 'System',
  sourceMap: true
}).target('...');

Notice that compilerOptions is no longer defined, and instead, its children (module, sourceMap, etc) are defined alongside moduleName!

Note: The first example (aka, using compilerOptions) will still work.

License

MIT © FlyJS

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago

0.1.1

9 years ago

0.1.0

9 years ago