-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (46 loc) · 1.65 KB
/
Makefile
File metadata and controls
60 lines (46 loc) · 1.65 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
.PHONY: build
build: build-js build-types
.PHONY: check
check: lint build check-package.json
.PHONY: check-package.json
check-package.json: build
bun x -- bun-dx --package @cubing/dev-config package.json -- check
.PHONY: setup
setup:
@command -v bun > /dev/null || { echo "\nPlease install \`bun\` to work on this project:\n\n # from npm\n npm install --global bun\n\n # macOS (Homebrew)\n brew install oven-sh/bun/bun\n\n # For other options, see: https://bun.sh/\n" && exit 1 ; }
bun install --frozen-lockfile
.PHONY: build-js
build-js: setup
bun run -- ./script/build-js.ts
.PHONY: build-types
build-types: setup
bun x -- bun-dx --package typescript tsc -- --project ./tsconfig.types.json
.PHONY: dev
dev: setup
bun run -- ./script/dev.ts
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: lint
lint: setup
bun x -- bun-dx --package @biomejs/biome biome -- check
bun x -- bun-dx --package typescript tsc -- --project ./tsconfig.json
.PHONY: format
format: setup
bun x -- bun-dx --package @biomejs/biome biome -- check
.PHONY: encrypt-fake-competition
encrypt-fake-competition: setup
bun run src/bin/main.ts \
encrypt \
"./src/dev/fake-competition/Fake Test Competition.json" \
"./src/dev/fake-competition/Fake Test Competition - Computer Display PDF Passcodes - SECRET.txt" \
"./src/dev/fake-competition/Fake Test Competition.encrypted-scrambles.json"
.PHONY: prepublishOnly
prepublishOnly: clean build
.PHONY: publish
publish:
npm publish