chore(build): Remove traceur from build.
This removes traceur from the compilation step in broccoli. Broccoli now transpiles to es5 using the typescript compiler.
This commit is contained in:
parent
df8e15cab7
commit
b025f94351
|
@ -41,6 +41,7 @@ class DiffingTSCompiler implements DiffingBroccoliPlugin {
|
|||
this.tsOpts = Object.create(options);
|
||||
this.tsOpts.outDir = this.cachePath;
|
||||
this.tsOpts.target = (<any>ts).ScriptTarget[options.target];
|
||||
this.tsOpts.module = (<any>ts).ModuleKind[options.module];
|
||||
this.tsOpts.experimentalDecorators = true;
|
||||
this.rootFilePaths = options.rootFilePaths ? options.rootFilePaths.splice(0) : [];
|
||||
this.tsServiceHost = new CustomLanguageServiceHost(this.tsOpts, this.rootFilePaths,
|
||||
|
|
|
@ -83,6 +83,15 @@ module.exports = function makeBrowserTree(options, destinationPath) {
|
|||
],
|
||||
destDir: '/'
|
||||
});
|
||||
|
||||
var es5ModulesTree = new Funnel('modules', {
|
||||
include: ['**/**'],
|
||||
exclude: [
|
||||
'**/*.cjs',
|
||||
'benchmarks/e2e_test/**'
|
||||
],
|
||||
destDir: '/'
|
||||
});
|
||||
|
||||
var scriptPathPatternReplacement = {
|
||||
match: '@@FILENAME_NO_EXT',
|
||||
|
@ -108,12 +117,20 @@ module.exports = function makeBrowserTree(options, destinationPath) {
|
|||
sourceRoot: '.',
|
||||
target: 'ES6'
|
||||
});
|
||||
|
||||
// Call Traceur to lower the ES6 build tree to ES5
|
||||
var es5Tree = transpileWithTraceur(es6Tree, {
|
||||
destExtension: '.js',
|
||||
destSourceMapExtension: '.js.map',
|
||||
traceurOptions: {modules: 'instantiate', sourceMaps: true}
|
||||
|
||||
// Use TypeScript to transpile the *.ts files to ES5
|
||||
var es5Tree = compileWithTypescript(es5ModulesTree, {
|
||||
allowNonTsExtensions: false,
|
||||
declaration: false,
|
||||
emitDecoratorMetadata: true,
|
||||
experimentalDecorators: true,
|
||||
mapRoot: '', // force sourcemaps to use relative path
|
||||
module: 'System',
|
||||
noEmitOnError: false,
|
||||
rootDir: '.',
|
||||
sourceMap: true,
|
||||
sourceRoot: '.',
|
||||
target: 'ES5'
|
||||
});
|
||||
|
||||
// Now we add a few more files to the es6 tree that Traceur should not see
|
||||
|
|
|
@ -34,7 +34,7 @@ module.exports = function makeNodeTree(destinationPath) {
|
|||
experimentalDecorators: true,
|
||||
declaration: false,
|
||||
mapRoot: '', /* force sourcemaps to use relative path */
|
||||
module: 'commonjs',
|
||||
module: 'CommonJS',
|
||||
noEmitOnError: true,
|
||||
rootDir: '.',
|
||||
rootFilePaths: ['angular2/traceur-runtime.d.ts', 'angular2/globals.d.ts'],
|
||||
|
|
Loading…
Reference in New Issue