@@ -4,19 +4,12 @@ SOURCE_FILES:=$(shell find src/ -type f -name '*.ts')
44all : build
55
66.PHONY :build
7- build : cjs/build esm /build assets
7+ build : dist /build assets
88
99.PHONY :test
1010test :
1111 npx nyc mocha
1212
13- .PHONY :test-cjs
14- test-cjs :
15- mkdir -p cjs-test
16- cd test ; npx tsc --module commonjs --outdir ../cjs-test
17- echo ' {"type": "commonjs"}' > cjs-test/package.json
18- cd cjs-test; npx mocha --no-package
19-
2013.PHONY :lint
2114lint :
2215 npx eslint --quiet ' src/**/*.ts' ' test/**/*.ts'
@@ -37,34 +30,22 @@ start: build
3730
3831.PHONY :clean
3932clean :
40- rm -rf dist esm cjs cjs-test
41-
42- cjs/build : $(SOURCE_FILES )
43- npx tsc --module commonjs --outDir cjs/
44- echo ' {"type": "commonjs"}' > cjs/package.json
45- @# Creating a small file to keep track of the last build time
46- touch cjs/build
47-
48-
49- esm/build : $(SOURCE_FILES )
50- npx tsc --module es2022 --outDir esm/
51- echo ' {"type": "module"}' > esm/package.json
52- @# Creating a small file to keep track of the last build time
53- touch esm/build
33+ rm -rf dist
5434
5535
36+ dist/build : $(SOURCE_FILES )
37+ npx tsc
38+ touch dist/build
5639
5740.PHONY :assets
5841assets : assets/js/html-form-enhancer.js assets/js/serialize-json-form.js
5942
6043assets/js/html-form-enhancer.js : node_modules/html-form-enhancer/dist/html-form-enhancer.js
6144 mkdir -p assets/js
6245 cp node_modules/html-form-enhancer/dist/html-form-enhancer.* assets/js
63- touch cjs/build
6446
6547assets/js/serialize-json-form.js : node_modules/html-form-enhancer/dist/serialize-json-form.js
6648 cp node_modules/html-form-enhancer/dist/serialize-json-form.* assets/js
6749
68-
6950src/data/iana-links.json :
7051 node util/fetch-link-relation-data.mjs > src/data/iana-links.json
0 commit comments