-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
69 lines (54 loc) · 1.7 KB
/
Makefile
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
VERSION=1.0.1
.PHONY: help
help: # Display this help.
@awk 'BEGIN {FS = ":.*#"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?#/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^#@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
.PHONY: build-mac-arm
build-mac-arm:
@npx tauri build --target aarch64-apple-darwin
.PHONY: build-mac-intel
build-mac-intel:
@npx tauri build --target x86_64-apple-darwin
.PHONY: start
start:
@npm run tauri dev
.PHONY: preview
preview:
@npm run start
.PHONY: lint
lint:
@npm run lint
.PHONY: check
check:
@npm run typecheck
@npm run lint
@npm run format
.PHONY: set-version
set-version:
@npm version $(VERSION) --no-git-tag-version --allow-same-version
.PHONY: release-mac
release-mac:
@source .env && npm run release-mac
generate/out/generate.js: generate/generate.ts generate/syncPKHexResources.ts generate/enums.ts generate/parseFunctions/*
@echo "compiling generate/*.ts..."
@cd generate && tsc
.PHONY: generate
generate: generate/out/generate.js
@echo "generating typescript..."
@node ./generate/out/generate.js Items text/items/PostGen4.txt items/PostGen4.ts
@npx prettier --log-level silent --write src/resources/gen*
generate/out/syncPKHexResources.js: generate/syncPKHexResources.ts
@echo "compiling generate/syncPKHexResources.ts..."
@cd generate && tsc
.PHONY: sync-resources
sync-resources: generate/out
@echo "syncing PKHex resources..."
@node ./generate/out/syncPKHexResources.js
@echo "syncing finished"
.PHONY: download-item-sprites
download-item-sprites:
@python3 generate/downloadAllItems.py
.PHONY: test
test:
@ts-node --project tsconfig.node.json src/types/SAVTypes/__test__/G1SAV.test.ts
%:
@npm run $@