Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2019-09-04 16:01:08 -0400
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2019-10-17 11:47:14 -0400
commitbacefb0752d597cd521b3682072608659c6bdd9d (patch)
tree7907366f2f871d5803e8c341406a9ac2f2efd0ed /Makefile.am
parent4f8aa3c90b52700781427b9815d748e915fbd68f (diff)
downloadliza-bacefb0752d597cd521b3682072608659c6bdd9d.tar.gz
liza-bacefb0752d597cd521b3682072608659c6bdd9d.tar.bz2
liza-bacefb0752d597cd521b3682072608659c6bdd9d.zip
Build typescript files
* .gitignore (tsconfig.tsbuildinfo): Ignore generated file (used for incremental builds). * Makefile.am (tsout): New variable an recipe. (modindex, check): Depend on tsout. * dummy.ts: New (temporary) file. Will be removed once we have at least one ts file. * npm-shrinkwrap.json: Update. * package.json.in (devDependencies)[typescript]: New dependency. * tsconfig.json: New configuration file.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index fe2c8e5..d1a2b1c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,6 +24,8 @@ path_test = $(top_builddir)/test
namespaces=$(shell find src -type d)
nsindex=$(addsuffix /index.js, $(namespaces))
+tsout = tsconfig.tsbuildinfo
+
SUBDIRS = doc
EXTRA_DIST = $(path_src) package.json index.js $(path_src)/version.js \
tools autogen.sh README.md $(path_test) \
@@ -35,12 +37,17 @@ all-am: modindex
dist-hook: check
+# used to force typescript compilation (it handles its own incremental
+# compilation and dependency discovery)
+$(tsout): FORCE
+ node_modules/.bin/tsc
+
modindex: $(nsindex)
-%/index.js: FORCE
+%/index.js: FORCE $(tsout)
./tools/gen-index "$*" > "$@"
test: check
-check:
+check: $(tsout)
PATH="$(PATH):$(CURDIR)/node_modules/mocha/bin" \
mocha @NODE_DESTRUCTURE@ \
--require $(path_test)/pre.js \