-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
51 lines (36 loc) · 1008 Bytes
/
Makefile
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
40
41
42
43
44
45
46
47
48
49
50
51
SOURCE_FILES:=$(shell find src/ -type f -name '*.ts')
.PHONY:all
all: build
.PHONY:build
build: dist/build assets
.PHONY:test
test:
npx nyc mocha
.PHONY:lint
lint:
npx eslint --quiet 'src/**/*.ts*' 'test/**/*.ts*'
.PHONY:lint-fix
lint-fix: fix
.PHONY:fix
fix:
npx eslint --quiet 'src/**/*.ts*' 'test/**/*.ts*' --fix
.PHONY:watch
watch:
npx tsc --watch
.PHONY:start
start: build
.PHONY:clean
clean:
rm -rf dist
dist/build: $(SOURCE_FILES)
npx tsc
touch dist/build
.PHONY:assets
assets: assets/js/html-form-enhancer.js assets/js/serialize-json-form.js
assets/js/html-form-enhancer.js: node_modules/html-form-enhancer/dist/html-form-enhancer.js
mkdir -p assets/js
cp node_modules/html-form-enhancer/dist/html-form-enhancer.* assets/js
assets/js/serialize-json-form.js: node_modules/html-form-enhancer/dist/serialize-json-form.js
cp node_modules/html-form-enhancer/dist/serialize-json-form.* assets/js
data/iana-links.json:
node util/fetch-link-relation-data.mjs > data/iana-links.json