build(broccoli): make broccoli-typescript consume tsconfig style option

Previously it supported a weird mixture of tsconfig and internal options.
This commit is contained in:
Igor Minar
2015-10-15 16:29:24 -07:00
parent e4e74ae65c
commit b09788993d
3 changed files with 19 additions and 16 deletions

View File

@ -112,34 +112,33 @@ module.exports = function makeBrowserTree(options, destinationPath) {
// Use TypeScript to transpile the *.ts files to ES6
var es6Tree = compileWithTypescript(modulesTree, {
allowNonTsExtensions: false,
declaration: false,
emitDecoratorMetadata: true,
experimentalDecorators: true,
mapRoot: '', // force sourcemaps to use relative path
noEmitOnError: false,
rootDir: '.',
rootFilePaths: ['angular2/manual_typings/globals-es6.d.ts'],
sourceMap: true,
sourceRoot: '.',
target: 'ES6'
target: 'es6'
});
// Use TypeScript to transpile the *.ts files to ES5
var typescriptOptions = {
allowNonTsExtensions: false,
declaration: true,
stripInternal: true,
emitDecoratorMetadata: true,
experimentalDecorators: true,
mapRoot: '', // force sourcemaps to use relative path
module: 'CommonJS',
moduleResolution: 1 /* classic */,
module: 'commonjs',
moduleResolution: 'classic',
noEmitOnError: true,
rootDir: '.',
rootFilePaths: ['angular2/manual_typings/globals.d.ts'],
sourceMap: true,
sourceRoot: '.',
target: 'ES5'
target: 'es5'
};
var es5Tree = compileWithTypescript(es5ModulesTree, typescriptOptions);

View File

@ -33,21 +33,20 @@ module.exports = function makeNodeTree(destinationPath) {
});
var typescriptTree = compileWithTypescript(modulesTree, {
allowNonTsExtensions: false,
emitDecoratorMetadata: true,
experimentalDecorators: true,
declaration: true,
stripInternal: true,
mapRoot: '', /* force sourcemaps to use relative path */
module: 'CommonJS',
moduleResolution: 1 /* classic */,
module: 'commonjs',
moduleResolution: 'classic',
noEmitOnError: true,
rootDir: '.',
rootFilePaths:
['angular2/manual_typings/globals.d.ts', 'angular2/typings/es6-shim/es6-shim.d.ts'],
sourceMap: true,
sourceRoot: '.',
target: 'ES5'
target: 'es5'
});
// Now we add the LICENSE file into all the folders that will become npm packages