Package Exports
- broccoli-typescript-compiler
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (broccoli-typescript-compiler) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
broccoli-typescript-compiler
A Broccoli plugin which compiles TypeScript files.
How to install?
$ npm install broccoli-typescript-compiler --save-devHow to use?
var typescript = require('broccoli-typescript-compiler').typescript;
var cjsTree = typescript(inputTree, {
tsconfig: {
compilerOptions: {
module: "commonjs",
target: "es5",
moduleResolution: "node",
newLine: "LF",
rootDir: "src",
outDir: "dist",
sourceMap: true,
declaration: true
},
files: [
"src/index.ts",
"src/tests/**"
]
},
annotation: "compile program"
});Config Options:
tsconfig:
- default (when ommited): will find the nearest
tsconfigrelative to where the BroccoliTypeScriptCompiler is invoked. - as string: a absolute path to a config tsconfig file
- as config object: See: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
annotation:
An optional string, which when provide should be a descriptive annotation. Useful for debugging, to tell multiple instances of the same plugin apart.
Ways to use:
via the broccoli plugin subclass
var TypeScriptPlugin = require('broccoli-typescript-compiler').TypeScriptPlugin;via a function:
var filterTypeScript = require('broccoli-typescript-compiler').filterTypeScript;
var scriptTree = filterTypeScript(inputTree);