Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2019-09-04 16:56:59 -0400
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2019-10-17 11:47:14 -0400
commit5fafe4a469c0062fbef26e11ce37c9593be2a3fe (patch)
tree355f06f322b5f65025e40181215426f68b72bdf6
parent5a1b84c271a7e25c10c854ef0ce1a25d025337e5 (diff)
downloadliza-5fafe4a469c0062fbef26e11ce37c9593be2a3fe.tar.gz
liza-5fafe4a469c0062fbef26e11ce37c9593be2a3fe.tar.bz2
liza-5fafe4a469c0062fbef26e11ce37c9593be2a3fe.zip
Generate .gitignores for compiled JS files
This will help until all files are typescript.
-rw-r--r--.gitignore4
-rw-r--r--Makefile.am7
2 files changed, 10 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 2831abe..61aba11 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,10 @@ src/version.js
Makefile
package.json
+# generated by Makefile
+src/.gitignore
+test/.gitignore
+
# generated by gen-index
src/**/index.js
diff --git a/Makefile.am b/Makefile.am
index d1a2b1c..d608717 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,13 +39,18 @@ dist-hook: check
# used to force typescript compilation (it handles its own incremental
# compilation and dependency discovery)
-$(tsout): FORCE
+$(tsout): FORCE $(path_src)/.gitignore $(path_test)/.gitignore
node_modules/.bin/tsc
modindex: $(nsindex)
%/index.js: FORCE $(tsout)
./tools/gen-index "$*" > "$@"
+# ignore compiled JS files (this can be removed once all files are TS)
+%/.gitignore: FORCE
+ @echo "# THIS FILE IS GENERATED; DO NOT MODIFY!" > $@
+ ( cd $*/ && find . -name '*.ts' -printf "%P\n" | sed 's/\.ts$$/.js/' ) >> $@
+
test: check
check: $(tsout)
PATH="$(PATH):$(CURDIR)/node_modules/mocha/bin" \