From a7a756020181fee539ac5d63b87fa4c1cc029098 Mon Sep 17 00:00:00 2001 From: Oliver Akins Date: Tue, 15 Mar 2022 23:09:39 -0600 Subject: [PATCH] Add watch rules to the makefile --- common/makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/common/makefile b/common/makefile index 175834c..9dc1418 100644 --- a/common/makefile +++ b/common/makefile @@ -13,4 +13,16 @@ esm: cjs: mkdir $(CJS_LOCATION) --parents tsc --module commonjs --outDir $(CJS_LOCATION) - cp ./package.template.json $(CJS_LOCATION)/package.json \ No newline at end of file + cp ./package.template.json $(CJS_LOCATION)/package.json + +watch: + @echo To have Typescript auto-rebuild, run the following commands in new terminals + @echo "\tmake watch-esm" + @echo "\tmake watch-cjs" + @echo These processes will not terminate, which is why they cannot be run in the same rule + +watch-esm: + tsc --module es6 --outDir $(ESM_LOCATION) --watch + +watch-cjs: + tsc --module commonjs --outDir $(CJS_LOCATION) --watch \ No newline at end of file