add typechecking step to Makefile when DEBUG=on

pull/97/head
Harvey Tindall 3 years ago
parent 5d8f139356
commit 2c6d08319b
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -31,11 +31,13 @@ DEBUG ?= off
ifeq ($(DEBUG), on)
LDFLAGS := -s -w $(LDFLAGS)
SOURCEMAP := --sourcemap
TYPECHECK := tsc -noEmit --project ts/tsconfig.json
# jank
COPYTS := rm -r $(DATA)/web/js/ts; cp -r ts $(DATA)/web/js
else
SOURCEMAP :=
COPYTS :=
TYPECHECK :=
endif
npm:
@ -59,6 +61,7 @@ email:
python3 scripts/compile_mjml.py -o $(DATA)/
typescript:
$(TYPECHECK)
$(info compiling typescript)
-mkdir -p $(DATA)/web/js
-$(ESBUILD) --bundle ts/admin.ts $(SOURCEMAP) --outfile=./$(DATA)/web/js/admin.js --minify

@ -3,7 +3,7 @@
"outDir": "../js",
"target": "es6",
"lib": ["dom", "es2017"],
"typeRoots": ["./typings", "./node_modules/@types"],
"typeRoots": ["./typings", "../node_modules/@types"],
"moduleResolution": "node",
"esModuleInterop": true
}

Loading…
Cancel
Save