-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (31 loc) · 984 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (31 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
help:
@echo 'Targets:'
@echo ' clean Clean all artifacts & dependencies'
@echo ' dev-serve Start a webserver with a development build'
@echo ' develop Build a development build in dist/'
@echo ' test Run tests'
@echo ' build Build a production build in dist/'
@echo ' output Render files for publication in $$(OUTPUTDIR)'
clean:
rm -rf dist
rm -rf node_modules
find src -name '*.ts' -print | while read ts; do rm -f $${ts%%.ts}.js $${ts%%.ts}.js.map; done
find src -name '*.tsx' -print | while read ts; do rm -f $${ts%%.tsx}.js $${ts%%.tsx}.js.map; done
deps: package.json
npm install
touch $@
dev-deps: package-lock.json
npm install --include=dev
touch $@
build: deps
rm -rf dist
npx webpack --mode=production
output: build
mkdir -p "$(OUTPUTDIR)"
cp -a dist/. "$(OUTPUTDIR)"
develop: dev-deps
npx webpack --mode=development --stats=detailed
dev-serve: dev-deps
npx webpack serve --mode=development
test: dev-deps
npx jest