-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 809 Bytes
/
Makefile
File metadata and controls
40 lines (30 loc) · 809 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
40
SOURCE_FILES:=$(shell find src/ -type f -name '*.ts')
.PHONY: build
build: dist/build cjs/index.cjs
.PHONY: clean
clean:
rm -r dist/ cjs/
.PHONY: test
test: lint test/httpwg-tests/list.json dist/build
node --test
.PHONY: test-debug
test-debug:
node --test --inspect-brk
.PHONY: lint
lint:
node_modules/.bin/eslint --quiet 'src/**/*.ts'
.PHONY: fix
fix:
node_modules/.bin/eslint --quiet 'src/**/*.ts' --fix
.PHONY: watch
watch:
node_modules/.bin/tsc --watch
dist/build: $(SOURCE_FILES)
node_modules/.bin/tsc
@# A fake file to keep track of the last build time
touch dist/build
cjs/index.cjs: ${SOURCE_FILES}
mkdir -p cjs
npx tsup -d cjs --format cjs src/index.ts --dts --sourcemap
test/httpwg-tests/list.json:
git clone https://github.com/httpwg/structured-header-tests test/httpwg-tests