-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (50 loc) · 1.29 KB
/
Makefile
File metadata and controls
65 lines (50 loc) · 1.29 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
SOURCE_FILES := index.ts api.ts config.ts $(wildcard modes/*.ts utils/*.ts)
DIST_FILES := dist/index.js dist/api.js dist/api.d.ts dist/shared.js
node_modules: pnpm-lock.yaml
pnpm install
@touch node_modules
.PHONY: deps
deps: node_modules
.PHONY: lint
lint: node_modules
pnpm exec eslint-silverwind --color .
pnpm exec tsgo
.PHONY: lint-fix
lint-fix: node_modules
pnpm exec eslint-silverwind --color . --fix
pnpm exec tsgo
.PHONY: test
test: node_modules build
pnpm exec vitest
.PHONY: test-update
test-update: node_modules build
pnpm exec vitest -u
.PHONY: test-coverage
test-coverage: node_modules build
pnpm exec vitest --coverage
.PHONY: bench
bench: node_modules build
node bench/bench.ts
.PHONY: build
build: node_modules $(DIST_FILES)
$(DIST_FILES): $(SOURCE_FILES) pnpm-lock.yaml tsdown.config.ts
pnpm exec tsdown
chmod +x $(DIST_FILES)
.PHONY: update
update: node_modules
./dist/index.js -cu
rm -rf node_modules pnpm-lock.yaml
pnpm install
@touch node_modules
.PHONY: publish
publish: node_modules
pnpm publish --no-git-checks
.PHONY: patch
patch: node_modules lint test
pnpm exec versions -R patch package.json
.PHONY: minor
minor: node_modules lint test
pnpm exec versions -R minor package.json
.PHONY: major
major: node_modules lint test
pnpm exec versions -R major package.json