feat(make): introduce build flags
CI for skipping tests and being able to execute them separately in a CI service run and WATCH to not require a seperate npm scripts target.
This commit is contained in:
parent
1d90596e4a
commit
ec74d648ce
1 changed files with 12 additions and 3 deletions
15
Makefile
15
Makefile
|
|
@ -13,17 +13,26 @@ chore: configure package-lock.json
|
||||||
configure:
|
configure:
|
||||||
autoconf
|
autoconf
|
||||||
|
|
||||||
build/release: node_modules/ src/ tsconfig.json
|
build/release: node_modules/ src/ tsconfig.json $(if $(CI),,test-reports)
|
||||||
|
ifdef CI
|
||||||
|
$(warning CI set, tests skipped and requiring manual execution)
|
||||||
|
endif
|
||||||
$(NPM) run build:release
|
$(NPM) run build:release
|
||||||
|
|
||||||
build/debug: node_modules/ src/ tsconfig.debug.json
|
build/debug: node_modules/ src/ tsconfig.debug.json
|
||||||
$(NPM) run build:debug
|
ifdef WATCH
|
||||||
|
$(warning WATCH set, will build with watch mode)
|
||||||
|
endif
|
||||||
|
$(NPM) run build:debug $(if $(WATCH),-- --watch)
|
||||||
|
|
||||||
build/doc: node_modules/ src/ typedoc.json tsconfig.json
|
build/doc: node_modules/ src/ typedoc.json tsconfig.json
|
||||||
$(NPM) run doc
|
$(NPM) run doc
|
||||||
|
|
||||||
test-reports: node_modules/ tests/ src/ jest.config.mjs
|
test-reports: node_modules/ tests/ src/ jest.config.mjs
|
||||||
$(NPM) run test
|
ifdef WATCH
|
||||||
|
$(warning WATCH set, will test with watch mode)
|
||||||
|
endif
|
||||||
|
$(NPM) run test $(if $(WATCH),-- --watchAll)
|
||||||
|
|
||||||
dist: build/release/ build/doc/
|
dist: build/release/ build/doc/
|
||||||
$(NPM) run dist -- build/doc/
|
$(NPM) run dist -- build/doc/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue