compile typescript in one go
much faster, especially with --incremental
This commit is contained in:
parent
b676e484d3
commit
f3bfed82ef
15
Makefile
15
Makefile
@ -51,7 +51,7 @@ clean:
|
||||
rm -rf .build
|
||||
rm -rf $(JSDEPS)
|
||||
|
||||
build: .build/ui js
|
||||
build: .build/ui .build/js
|
||||
|
||||
.build/ui: $(shell find designer -name '*.ui')
|
||||
./tools/build_ui.sh
|
||||
@ -86,12 +86,9 @@ pytype: .build/pytype
|
||||
pytype --config pytype.conf
|
||||
touch $@
|
||||
|
||||
.PHONY: js
|
||||
TSDEPS := $(wildcard ts/src/*.ts)
|
||||
JSDEPS := $(patsubst ts/src/%.ts, web/%.js, $(TSDEPS))
|
||||
|
||||
TSDEPS := $(wildcard ts/*.ts)
|
||||
JSDEPS := $(patsubst ts/%.ts, web/%.js, $(TSDEPS))
|
||||
|
||||
js: $(JSDEPS)
|
||||
|
||||
web/%.js: ts/%.ts
|
||||
(cd ts && ./node_modules/.bin/tsc --lib es6,dom lib/global.d.ts $(notdir $<) --outFile ../web/$(notdir $@))
|
||||
.build/js: $(TSDEPS)
|
||||
(cd ts && ./node_modules/.bin/tsc --build)
|
||||
touch $@
|
||||
|
1
ts/.gitignore
vendored
1
ts/.gitignore
vendored
@ -1 +1,2 @@
|
||||
node_modules
|
||||
.buildinfo
|
||||
|
23
ts/tsconfig.json
Normal file
23
ts/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"rootDir": "src",
|
||||
"outDir": "../web",
|
||||
"incremental": true,
|
||||
"tsBuildInfoFile": "./.buildinfo",
|
||||
"strict": true,
|
||||
/* Enable all strict type-checking options. */
|
||||
"noImplicitAny": false,
|
||||
/* Raise error on expressions and declarations with an implied 'any' type. */
|
||||
"strictNullChecks": false,
|
||||
/* Enable strict null checks. */
|
||||
"noImplicitThis": false,
|
||||
/* Raise error on 'this' expressions with an implied 'any' type. */
|
||||
"esModuleInterop": true
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user