forked from cubing/icons
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (59 loc) · 1.81 KB
/
Makefile
File metadata and controls
77 lines (59 loc) · 1.81 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
66
67
68
69
70
71
72
73
74
75
76
77
.PHONY: build
build: build-lib build-web
.PHONY: check
check: lint test build check-package.json
.PHONY: build-lib
build-lib: build-lib-js build-lib-types
.PHONY: build-lib-js
build-lib-js: setup
bun run script/build-lib-js.ts
.PHONY: build-lib-types
build-lib-types: build-lib-js
bun x -- bun-dx --package typescript tsc -- --project ./tsconfig.build.jsonc
.PHONY: build-web
build-web: setup build-lib-js
bun run script/build-web.ts
.PHONY: setup
setup:
@# Makes sure dependencies match the current checkout. Very fast no-op.
bun install --frozen-lockfile
.PHONY: test
test: test-bun test-exports lint
.PHONY: test-bun
test-bun: setup
bun test
.PHONY: test-exports
test-exports: build-lib-js
# Yes, this is a lot of test cases: https://github.com/cubing/icons/pull/200#issuecomment-3182362760
node -- 'test/exports/test-legacy-export.js'
bun run -- 'test/exports/test-legacy-export.js'
bun run -- 'test/exports/test-legacy-export.ts'
node -- 'test/exports/test-package-export.js'
bun run -- 'test/exports/test-package-export.js'
bun run -- 'test/exports/test-package-export.ts'
.PHONY: lint
lint: setup lint-ts-biome lint-ts-tsc
.PHONY: lint-ts-biome
lint-ts-biome: build-lib-js
bun x -- bun-dx --package @biomejs/biome biome -- check
.PHONY: lint-ts-tsc
lint-ts-tsc: build-lib-types
bun x -- bun-dx --package typescript tsc -- --project .
bun x -- bun-dx --package typescript tsc -- --project ./test/exports/tsconfig.json
.PHONY: format
format: setup
bun x -- bun-dx --package @biomejs/biome biome -- check --write
.PHONY: check-package.json
check-package.json: build
bun x --package @cubing/dev-config package.json -- check
.PHONY: clean
clean:
rm -rf ./.temp/ ./dist/
.PHONY: reset
reset: clean
rm -rf ./node_modules
.PHONY: publish
publish:
npm publish
.PHONY: prepublishOnly
prepublishOnly: clean check build