2
2
3
3
var Funnel = require ( 'broccoli-funnel' ) ;
4
4
var htmlReplace = require ( '../html-replace' ) ;
5
- var jsReplace = require ( " ../js-replace" ) ;
5
+ var jsReplace = require ( ' ../js-replace' ) ;
6
6
var path = require ( 'path' ) ;
7
7
var stew = require ( 'broccoli-stew' ) ;
8
+ var traceur = require ( 'traceur' ) ;
8
9
9
10
import compileWithTypescript from '../broccoli-typescript' ;
10
11
import destCopy from '../broccoli-dest-copy' ;
11
12
import flatten from '../broccoli-flatten' ;
12
13
import mergeTrees from '../broccoli-merge-trees' ;
13
14
import replace from '../broccoli-replace' ;
14
- import { default as transpileWithTraceur , TRACEUR_RUNTIME_PATH } from '../traceur/index' ;
15
15
16
16
17
17
var projectRootDir = path . normalize ( path . join ( __dirname , '..' , '..' , '..' , '..' ) ) ;
@@ -83,13 +83,10 @@ module.exports = function makeBrowserTree(options, destinationPath) {
83
83
] ,
84
84
destDir : '/'
85
85
} ) ;
86
-
86
+
87
87
var es5ModulesTree = new Funnel ( 'modules' , {
88
88
include : [ '**/**' ] ,
89
- exclude : [
90
- '**/*.cjs' ,
91
- 'benchmarks/e2e_test/**'
92
- ] ,
89
+ exclude : [ '**/*.cjs' , 'angular1_router/**' , 'benchmarks/e2e_test/**' ] ,
93
90
destDir : '/'
94
91
} ) ;
95
92
@@ -117,23 +114,23 @@ module.exports = function makeBrowserTree(options, destinationPath) {
117
114
sourceRoot : '.' ,
118
115
target : 'ES6'
119
116
} ) ;
120
-
117
+
121
118
// Use TypeScript to transpile the *.ts files to ES5
122
119
var es5Tree = compileWithTypescript ( es5ModulesTree , {
123
120
allowNonTsExtensions : false ,
124
121
declaration : false ,
125
122
emitDecoratorMetadata : true ,
126
123
experimentalDecorators : true ,
127
124
mapRoot : '' , // force sourcemaps to use relative path
128
- module : 'System ' ,
125
+ module : 'CommonJS ' ,
129
126
noEmitOnError : false ,
130
127
rootDir : '.' ,
131
128
sourceMap : true ,
132
129
sourceRoot : '.' ,
133
130
target : 'ES5'
134
131
} ) ;
135
132
136
- // Now we add a few more files to the es6 tree that Traceur should not see
133
+ // Now we add a few more files to the es6 tree that the es5 tree should not see
137
134
[ 'angular2' , 'rtts_assert' ] . forEach ( function ( destDir ) {
138
135
var extras = new Funnel ( 'tools/build' , { files : [ 'es5build.js' ] , destDir : destDir } ) ;
139
136
es6Tree = mergeTrees ( [ es6Tree , extras ] ) ;
@@ -147,7 +144,7 @@ module.exports = function makeBrowserTree(options, destinationPath) {
147
144
'node_modules/rx/dist/rx.js' ,
148
145
'node_modules/base64-js/lib/b64.js' ,
149
146
'node_modules/reflect-metadata/Reflect.js' ,
150
- path . relative ( projectRootDir , TRACEUR_RUNTIME_PATH )
147
+ path . relative ( projectRootDir , traceur . RUNTIME_PATH )
151
148
]
152
149
} ) ) ;
153
150
0 commit comments