@@ -17,6 +17,7 @@ debug ?= false
1717updateTests ?= false
1818fat ?= false
1919push ?= true
20+ useSWC ?= true
2021outputFolder ?= ''
2122version = $(shell cat package.json | ./node_modules/node-jq/bin/jq -r '.version')
2223
@@ -60,12 +61,13 @@ start dev love:
6061 --env includePlugins=$(includePlugins ) \
6162 --env excludePlugins=$(excludePlugins ) \
6263 --env isTest=$(isTest ) \
64+ --env useSWC=$(useSWC ) \
6365 --env fat=$(fat )
6466
6567.PHONY : build
6668build :
67- @TS_NODE_TRANSPILE_ONLY=true $(WEBPACK ) --progress --mode production \
68- --env stat=true \
69+ @TS_NODE_TRANSPILE_ONLY=true $(WEBPACK ) $( if $( watch ) , watch, --progress) --mode production \
70+ $( if $( watch ) ,, --env stat=true) \
6971 --env es=$(es ) \
7072 --env uglify=$(uglify ) \
7173 --env isTest=$(isTest ) \
@@ -234,7 +236,7 @@ prettify:
234236test :
235237 make test-find
236238 make clean
237- make build es=$(es ) uglify=$(uglify ) isTest=true fat=$(fat )
239+ make build es=$(es ) uglify=$(uglify ) isTest=true fat=$(fat ) stat=false
238240 make test-only-run build=$(es ) uglify=$(uglify ) fat=$(fat ) browsers=$(browsers )
239241
240242
@@ -244,7 +246,13 @@ test-find find-test:
244246
245247.PHONY : test-only-run test-run-only
246248test-only-run test-run-only :
247- $(KARMA ) --browsers $(browsers ) $(cwd ) tools/karma.conf.ts --single-run $(singleRun ) --build=$(build ) --min=$(uglify ) --fat=$(fat ) --cwd=$(pwd )
249+ $(KARMA ) --browsers $(browsers ) $(cwd ) tools/karma.conf.ts --single-run=$(singleRun ) --build=$(build ) --min=$(uglify ) --fat=$(fat ) --cwd=$(pwd ) $(if $(watch ) , --auto-watch,)
250+
251+
252+ .PHONY : test-watch
253+ test-watch :
254+ @echo " Start build and test in watch mode ..."
255+ @$(NODE_MODULES_BIN ) /concurrently --kill-others " make build watch=true es=$( es) " " make test-run-only watch=true singleRun=false build=$( es) "
248256
249257.PHONY : coverage
250258coverage :
0 commit comments