-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
71 lines (53 loc) · 1.55 KB
/
Makefile
File metadata and controls
71 lines (53 loc) · 1.55 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
.PHONY: build
build: build-js build-types
.PHONY: build-js
build-js: setup
bun run -- ./script/build.ts
.PHONY: build-types
build-types: setup
bun x -- bun-dx --package @typescript/native-preview tsgo -- --project ./tsconfig.types.json
.PHONY: check
check: lint build check-package.json
.PHONY: lint
lint: lint-biome lint-typescript check-readme-cli-help
.PHONY: lint-biome
lint-biome: setup
bun x -- bun-dx --package @biomejs/biome biome -- check
.PHONY: lint-typescript
lint-typescript: setup
bun x -- bun-dx --package @typescript/native-preview tsgo -- --project ./tsconfig.json
.PHONY: format
format: setup update-readme-cli-help
bun x -- bun-dx --package @biomejs/biome biome -- check --write
.PHONY: check-package.json
check-package.json: build
bun x -- bun-dx --package @cubing/dev-config package.json -- check
.PHONY: publish
publish:
npm publish
.PHONY: update-readme-cli-help
update-readme-cli-help: setup
bun x readme-cli-help update
.PHONY: check-readme-cli-help
check-readme-cli-help: setup
bun x -- bun-dx --package readme-cli-help readme-cli-help -- check
.PHONY: setup
setup:
bun install --frozen-lockfile
.PHONY: deploy
deploy: setup
mkdir -p ./dist/web
cp -R ./src/web/ ./dist/web/
bun run src/cli/main.ts
.PHONY: test
test: setup
bun test
RM_RF = bun -e 'process.argv.slice(1).map(p => process.getBuiltinModule("node:fs").rmSync(p, {recursive: true, force: true, maxRetries: 5}))' --
.PHONY: clean
clean:
${RM_RF} ./dist/
.PHONY: reset
reset: clean
${RM_RF} ./node_modules/
.PHONY: prepublishOnly
prepublishOnly: clean check build