Skip to content

Commit 67aeff3

Browse files
committed
Cleanup after #1979 (#2123)
1 parent 4065edc commit 67aeff3

File tree

2 files changed

+70
-65
lines changed

2 files changed

+70
-65
lines changed

Makefile

+68-64
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
11
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.
66

77
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
1919

2020
RUNTIME_MODULES = src/runtime/runtime-modules.js
2121

2222
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
3535
SRC = \
36-
$(RUNTIME_MODULES) \
37-
$(POLYFILL_SRC) \
38-
src/traceur-import.js
36+
$(RUNTIME_MODULES) \
37+
$(POLYFILL_SRC) \
38+
src/traceur-import.js
3939
TPL_GENSRC = \
40-
src/outputgeneration/regexpuRewritePattern.js \
41-
src/outputgeneration/SourceMapIntegration.js
40+
src/outputgeneration/regexpuRewritePattern.js \
41+
src/outputgeneration/SourceMapIntegration.js
4242
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
4848

4949
PREV_NODE = $(wildcard node_modules/traceur/src/node/*.js)
5050
SRC_NODE = $(wildcard src/node/*.js)
@@ -91,22 +91,26 @@ build: bin/traceur.js wiki
9191
min: bin/traceur.min.js
9292

9393
# Uses uglifyjs to compress. Make sure you have it installed
94-
# npm install uglify-js -g
94+
# npm install uglify-js -g
9595
ugly: bin/traceur.ugly.js
9696

9797
test-runtime: bin/traceur-runtime.js $(RUNTIME_TESTS)
9898
@echo 'Open test/runtime.html to test runtime only'
9999

100100
test: bin/traceur.js \
101-
bin/BrowserSystem.js \
101+
bin/BrowserSystem.js \
102102
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
110114
node_modules/.bin/mocha $(MOCHA_OPTIONS) $(TESTS)
111115
$(MAKE) test-interpret-throw
112116

@@ -119,9 +123,9 @@ test/features: bin/traceur.js bin/traceur-runtime.js $(FEATURE_TESTS)
119123
test/%-run: test/% bin/traceur.js
120124
node_modules/.bin/mocha $(MOCHA_OPTIONS) $<
121125

122-
test/mocha: bin/traceur.js
126+
test/module-compiled: bin/traceur.js
123127
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/**/
125129

126130
test/commonjs: test/commonjs-compiled
127131
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
143147

144148
test-inline-module-error:
145149
./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
147151

148152
test/commonjs-compiled: force
149153
rm -f -r test.commonjs-compiled/*
@@ -202,7 +206,7 @@ bin/%.min.js: bin/%.js
202206
# https://github.com/google/traceur-compiler/issues/828
203207
bin/traceur-runtime.js: $(RUNTIME_SRC) $(RUNTIME_MODULES) $(POLYFILL_SRC) bin/traceur.js
204208
./traceur --out $@ --referrer='traceur-runtime@$(PACKAGE_VERSION)/bin/' \
205-
$(RUNTIME_SCRIPTS) $(TFLAGS) $(RUNTIME_MODULES) $(POLYFILL_SRC)
209+
$(RUNTIME_SCRIPTS) $(TFLAGS) $(RUNTIME_MODULES) $(POLYFILL_SRC)
206210

207211
bin/traceur-bare.js: src/traceur-import.js build/compiled-by-previous-traceur.js
208212
./traceur --out $@ $(TFLAGS) $<
@@ -213,33 +217,33 @@ concat: bin/traceur-runtime.js bin/traceur-bare.js
213217
bin/traceur.js: build/compiled-by-previous-traceur.js $(SRC_NODE)
214218
@cp $< $@; touch -t 197001010000.00 bin/traceur.js
215219
./traceur --source-maps=file --out bin/traceur.js --referrer='traceur@$(PACKAGE_VERSION)/bin/' \
216-
$(RUNTIME_SCRIPTS) $(TFLAGS) $(SRC)
220+
$(RUNTIME_SCRIPTS) $(TFLAGS) $(SRC)
217221

218222
# Use last-known-good compiler to compile current source
219223
build/compiled-by-previous-traceur.js: src/loader/version.js \
220224
$(PREV_NODE) \
221225
$(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
223227
@mkdir -p bin/
224228
node_modules/traceur/traceur --out $@ --referrer='traceur@0.0.0/build/' \
225-
$(RUNTIME_SCRIPTS) $(TFLAGS) $(SRC)
229+
$(RUNTIME_SCRIPTS) $(TFLAGS) $(SRC)
226230

227231
debug: build/compiled-by-previous-traceur.js $(SRC)
228232
./traceur --debug --out bin/traceur.js --sourcemap $(RUNTIME_SCRIPTS) $(TFLAGS) $(SRC)
229233

230234
# Stand-alone browser support, incl. runtime, polyfills, compiler, and System
231235
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
234238

235239
#
236240
# Rules to test traceur.js compiled through path that first compiles out modules then es6.
237241
# The regular compiler must be built before running these rules.
238242
#
239243

240244
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
243247

244248
build/es6-no-modules/global-imports.js: $(RUNTIME_MODULES) $(POLYFILL_SRC) src/runtime/runtime-modules.js src/runtime/polyfills-imports.js
245249
./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
256260
./traceur --out $@ --referrer='traceur@$(PACKAGE_VERSION)/bin/' --script bin/traceur-es6-no-modules.js $(TFLAGS)
257261

258262
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.
260264
cp bin/traceur-from-no-modules.js bin/traceur.js
261265
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
263267
cp -p bin/gold-traceur.js bin/traceur.js # preserve timestamp to avoid make triggers.
264268
rm bin/gold-traceur.js
265269

266270
#
267271
#
268272

269273
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
271275
node $^ > $@
272276

273277
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
275279
node $^ > $@
276280

277281
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
279283
node $^ > $@
280284

281285
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
283287
node $^ > $@
284288

285289
src/loader/version.js: package.json build/versionInfo.js
@@ -314,7 +318,7 @@ dist/commonjs: bin/traceur.js
314318
prepublish: bin/traceur.js bin/traceur-runtime.js dist/commonjs/
315319

316320
WIKI_OUT = \
317-
test/wiki/CompilingOffline/out/greeter.js
321+
test/wiki/CompilingOffline/out/greeter.js
318322

319323
wiki: $(WIKI_OUT)
320324

test/cjs-mocha-compiler.js test/register-cjs-test-wrapper.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ require.extensions['.js'] = function(module, path) {
1111
return;
1212
}
1313

14-
// TODO(arv): Reuse parseProlog.
14+
// TODO(arv): Use parseProlog from src/util/parseProlog.js so that we can
15+
// compile when we have non default options too.
1516
var compiled = traceurAPI.compile(content, {
1617
modules: 'commonjs',
1718
importRuntime: true,

0 commit comments

Comments
 (0)