1
1
RUNTIME_SRC = \
2
- src/runtime/runtime.js \
3
- src/runtime/url.js \
4
- src/loader/ModuleStoreImpl.js \
5
- # end files that must be script.
2
+ src/runtime/runtime.js \
3
+ src/runtime/url.js \
4
+ src/loader/ModuleStoreImpl.js \
5
+ # end files that must be script.
6
6
7
7
POLYFILL_SRC = \
8
- src/runtime/polyfills/Map.js \
9
- src/runtime/polyfills/Set.js \
10
- src/runtime/polyfills/Promise.js \
11
- src/runtime/polyfills/String.js \
12
- src/runtime/polyfills/Array.js \
13
- src/runtime/polyfills/Object.js \
14
- src/runtime/polyfills/Number.js \
15
- src/runtime/polyfills/Math.js \
16
- src/runtime/polyfills/WeakMap.js \
17
- src/runtime/polyfills/WeakSet.js \
18
- src/runtime/polyfills/polyfills.js
8
+ src/runtime/polyfills/Map.js \
9
+ src/runtime/polyfills/Set.js \
10
+ src/runtime/polyfills/Promise.js \
11
+ src/runtime/polyfills/String.js \
12
+ src/runtime/polyfills/Array.js \
13
+ src/runtime/polyfills/Object.js \
14
+ src/runtime/polyfills/Number.js \
15
+ src/runtime/polyfills/Math.js \
16
+ src/runtime/polyfills/WeakMap.js \
17
+ src/runtime/polyfills/WeakSet.js \
18
+ src/runtime/polyfills/polyfills.js
19
19
20
20
RUNTIME_MODULES = src/runtime/runtime-modules.js
21
21
22
22
INDIVIDUAL_RUNTIME_MODULES = \
23
- src/runtime/exportStar.js \
24
- src/runtime/properTailCalls.js \
25
- src/runtime/relativeRequire.js \
26
- src/runtime/spread.js \
27
- src/runtime/destructuring.js \
28
- src/runtime/classes.js \
29
- src/runtime/generators.js \
30
- src/runtime/async.js \
31
- src/runtime/spawn.js \
32
- src/runtime/template.js \
33
- src/runtime/jsx.js \
34
- # end runtime modules
23
+ src/runtime/exportStar.js \
24
+ src/runtime/properTailCalls.js \
25
+ src/runtime/relativeRequire.js \
26
+ src/runtime/spread.js \
27
+ src/runtime/destructuring.js \
28
+ src/runtime/classes.js \
29
+ src/runtime/generators.js \
30
+ src/runtime/async.js \
31
+ src/runtime/spawn.js \
32
+ src/runtime/template.js \
33
+ src/runtime/jsx.js \
34
+ # end runtime modules
35
35
SRC = \
36
- $(RUNTIME_MODULES ) \
37
- $(POLYFILL_SRC ) \
38
- src/traceur-import.js
36
+ $(RUNTIME_MODULES ) \
37
+ $(POLYFILL_SRC ) \
38
+ src/traceur-import.js
39
39
TPL_GENSRC = \
40
- src/outputgeneration/regexpuRewritePattern.js \
41
- src/outputgeneration/SourceMapIntegration.js
40
+ src/outputgeneration/regexpuRewritePattern.js \
41
+ src/outputgeneration/SourceMapIntegration.js
42
42
GENSRC = \
43
- $(TPL_GENSRC ) \
44
- src/codegeneration/ParseTreeTransformer.js \
45
- src/syntax/trees/ParseTreeType.js \
46
- src/syntax/trees/ParseTrees.js \
47
- src/syntax/ParseTreeVisitor.js
43
+ $(TPL_GENSRC ) \
44
+ src/codegeneration/ParseTreeTransformer.js \
45
+ src/syntax/trees/ParseTreeType.js \
46
+ src/syntax/trees/ParseTrees.js \
47
+ src/syntax/ParseTreeVisitor.js
48
48
49
49
PREV_NODE = $(wildcard node_modules/traceur/src/node/* .js)
50
50
SRC_NODE = $(wildcard src/node/* .js)
@@ -91,22 +91,26 @@ build: bin/traceur.js wiki
91
91
min : bin/traceur.min.js
92
92
93
93
# Uses uglifyjs to compress. Make sure you have it installed
94
- # npm install uglify-js -g
94
+ # npm install uglify-js -g
95
95
ugly : bin/traceur.ugly.js
96
96
97
97
test-runtime : bin/traceur-runtime.js $(RUNTIME_TESTS )
98
98
@echo ' Open test/runtime.html to test runtime only'
99
99
100
100
test : bin/traceur.js \
101
- bin/BrowserSystem.js \
101
+ bin/BrowserSystem.js \
102
102
test/unit \
103
- test/unit/runtime/traceur-runtime \
104
- wiki test/amd-compiled test/commonjs-compiled test-interpret \
105
- test-interpret-absolute test-inline-module-error \
106
- test-version \
107
- test/features \
108
- test/mocha \
109
- test-experimental
103
+ test/unit/runtime/traceur-runtime \
104
+ wiki \
105
+ test/amd-compiled \
106
+ test/commonjs-compiled \
107
+ test-interpret \
108
+ test-interpret-absolute \
109
+ test-inline-module-error \
110
+ test-version \
111
+ test/features \
112
+ test/module-compiled \
113
+ test-experimental
110
114
node_modules/.bin/mocha $(MOCHA_OPTIONS ) $(TESTS )
111
115
$(MAKE ) test-interpret-throw
112
116
@@ -119,9 +123,9 @@ test/features: bin/traceur.js bin/traceur-runtime.js $(FEATURE_TESTS)
119
123
test/% -run : test/% bin/traceur.js
120
124
node_modules/.bin/mocha $(MOCHA_OPTIONS ) $<
121
125
122
- test/mocha : bin/traceur.js
126
+ test/module-compiled : bin/traceur.js
123
127
node_modules/.bin/mocha $(MOCHA_OPTIONS ) \
124
- --compilers js:test/cjs-mocha-compiler .js --reporter dot test/feature/** /
128
+ --compilers js:test/register- cjs-test-wrapper .js --reporter dot test/feature/** /
125
129
126
130
test/commonjs : test/commonjs-compiled
127
131
node_modules/.bin/mocha $(MOCHA_OPTIONS ) test/node-commonjs-test.js
@@ -143,7 +147,7 @@ test-interpret-absolute: $(CURDIR)/test/unit/node/traceur-interpreter.js
143
147
144
148
test-inline-module-error :
145
149
./traceur --out not-written.js \
146
- test/feature/Modules/Error_ImportDefault.js 2>&1 | sed ' 1d' > /dev/null
150
+ test/feature/Modules/Error_ImportDefault.js 2>&1 | sed ' 1d' > /dev/null
147
151
148
152
test/commonjs-compiled : force
149
153
rm -f -r test.commonjs-compiled/*
@@ -202,7 +206,7 @@ bin/%.min.js: bin/%.js
202
206
# https://github.com/google/traceur-compiler/issues/828
203
207
bin/traceur-runtime.js : $(RUNTIME_SRC ) $(RUNTIME_MODULES ) $(POLYFILL_SRC ) bin/traceur.js
204
208
./traceur --out $@ --referrer=' traceur-runtime@$(PACKAGE_VERSION)/bin/' \
205
- $(RUNTIME_SCRIPTS ) $(TFLAGS ) $(RUNTIME_MODULES ) $(POLYFILL_SRC )
209
+ $(RUNTIME_SCRIPTS ) $(TFLAGS ) $(RUNTIME_MODULES ) $(POLYFILL_SRC )
206
210
207
211
bin/traceur-bare.js : src/traceur-import.js build/compiled-by-previous-traceur.js
208
212
./traceur --out $@ $(TFLAGS ) $<
@@ -213,33 +217,33 @@ concat: bin/traceur-runtime.js bin/traceur-bare.js
213
217
bin/traceur.js : build/compiled-by-previous-traceur.js $(SRC_NODE )
214
218
@cp $< $@ ; touch -t 197001010000.00 bin/traceur.js
215
219
./traceur --source-maps=file --out bin/traceur.js --referrer=' traceur@$(PACKAGE_VERSION)/bin/' \
216
- $(RUNTIME_SCRIPTS ) $(TFLAGS ) $(SRC )
220
+ $(RUNTIME_SCRIPTS ) $(TFLAGS ) $(SRC )
217
221
218
222
# Use last-known-good compiler to compile current source
219
223
build/compiled-by-previous-traceur.js : src/loader/version.js \
220
224
$(PREV_NODE ) \
221
225
$(SRC ) \
222
- node_modules/traceur/bin/traceur.js $(SRC_ALL ) $(GENSRC ) node_modules
226
+ node_modules/traceur/bin/traceur.js $(SRC_ALL ) $(GENSRC ) node_modules
223
227
@mkdir -p bin/
224
228
node_modules/traceur/traceur --out $@ --referrer=' traceur@0.0.0/build/' \
225
- $(RUNTIME_SCRIPTS ) $(TFLAGS ) $(SRC )
229
+ $(RUNTIME_SCRIPTS ) $(TFLAGS ) $(SRC )
226
230
227
231
debug : build/compiled-by-previous-traceur.js $(SRC )
228
232
./traceur --debug --out bin/traceur.js --sourcemap $(RUNTIME_SCRIPTS ) $(TFLAGS ) $(SRC )
229
233
230
234
# Stand-alone browser support, incl. runtime, polyfills, compiler, and System
231
235
bin/BrowserSystem.js : src/browser/System.js src/WebPageTranscoder.js $(SRC_ALL )
232
- node_modules/traceur/traceur --source-maps=file --out $@ --referrer=' traceur@$(PACKAGE_VERSION)/bin/' \
233
- $(RUNTIME_SCRIPTS ) $(TFLAGS ) $(SRC ) src/browser/System.js
236
+ node_modules/traceur/traceur --source-maps=file --out $@ --referrer=' traceur@$(PACKAGE_VERSION)/bin/' \
237
+ $(RUNTIME_SCRIPTS ) $(TFLAGS ) $(SRC ) src/browser/System.js
234
238
235
239
#
236
240
# Rules to test traceur.js compiled through path that first compiles out modules then es6.
237
241
# The regular compiler must be built before running these rules.
238
242
#
239
243
240
244
build/es6-no-modules/compiler.js : $(SRC_NODE ) src/traceur-import.js
241
- node_modules/traceur/traceur --out $@ --modules=inline --referrer=' traceur@0.0.0/build/es6-no-modules/' \
242
- --outputLanguage=es6 $(TFLAGS ) src/traceur-import.js
245
+ node_modules/traceur/traceur --out $@ --modules=inline --referrer=' traceur@0.0.0/build/es6-no-modules/' \
246
+ --outputLanguage=es6 $(TFLAGS ) src/traceur-import.js
243
247
244
248
build/es6-no-modules/global-imports.js : $(RUNTIME_MODULES ) $(POLYFILL_SRC ) src/runtime/runtime-modules.js src/runtime/polyfills-imports.js
245
249
./traceur --out build/es6-no-modules/global-imports.js --modules=inline --outputLanguage=es6 -- src/runtime/global-imports.js
@@ -256,30 +260,30 @@ bin/traceur-from-no-modules.js: bin/traceur-es6-no-modules.js
256
260
./traceur --out $@ --referrer=' traceur@$(PACKAGE_VERSION)/bin/' --script bin/traceur-es6-no-modules.js $(TFLAGS )
257
261
258
262
test-no-modules : bin/traceur-from-no-modules.js bin/traceur-runtime.js bin/traceur.js
259
- cp bin/traceur.js bin/gold-traceur.js # bin/traceur.js is called by test rules, so temp override it.
263
+ cp bin/traceur.js bin/gold-traceur.js # bin/traceur.js is called by test rules, so temp override it.
260
264
cp bin/traceur-from-no-modules.js bin/traceur.js
261
265
touch bin/traceur-runtime.js # our temp bin/traceur.js has a new timestamp, don't trigger rebuild.
262
- -$(MAKE ) -r test
266
+ -$(MAKE ) -r test
263
267
cp -p bin/gold-traceur.js bin/traceur.js # preserve timestamp to avoid make triggers.
264
268
rm bin/gold-traceur.js
265
269
266
270
#
267
271
#
268
272
269
273
src/syntax/trees/ParseTrees.js : \
270
- build/build-parse-trees.js src/syntax/trees/trees.json
274
+ build/build-parse-trees.js src/syntax/trees/trees.json
271
275
node $^ > $@
272
276
273
277
src/syntax/trees/ParseTreeType.js : \
274
- build/build-parse-tree-type.js src/syntax/trees/trees.json
278
+ build/build-parse-tree-type.js src/syntax/trees/trees.json
275
279
node $^ > $@
276
280
277
281
src/syntax/ParseTreeVisitor.js : \
278
- build/build-parse-tree-visitor.js src/syntax/trees/trees.json
282
+ build/build-parse-tree-visitor.js src/syntax/trees/trees.json
279
283
node $^ > $@
280
284
281
285
src/codegeneration/ParseTreeTransformer.js : \
282
- build/build-parse-tree-transformer.js src/syntax/trees/trees.json
286
+ build/build-parse-tree-transformer.js src/syntax/trees/trees.json
283
287
node $^ > $@
284
288
285
289
src/loader/version.js : package.json build/versionInfo.js
@@ -314,7 +318,7 @@ dist/commonjs: bin/traceur.js
314
318
prepublish : bin/traceur.js bin/traceur-runtime.js dist/commonjs/
315
319
316
320
WIKI_OUT = \
317
- test/wiki/CompilingOffline/out/greeter.js
321
+ test/wiki/CompilingOffline/out/greeter.js
318
322
319
323
wiki : $(WIKI_OUT )
320
324
0 commit comments