-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
133 lines (106 loc) · 3.68 KB
/
Taskfile.yml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
version: 3
dotenv: [".env"]
vars:
PANORAMA_LAYOUTS_SRC_PATH: "content/panorama/layout"
PANORAMA_SCRIPTS_SRC_PATH: "src/content/panorama/scripts"
PANORAMA_STYLES_SRC_PATH: "content/panorama/styles"
VSCRIPTS_SRC_PATH: "game/scripts/vscripts"
TASKS_SRC_PATH: "src/tasks"
TASKS_ENTRYPOINT: "{{ .TASKS_SRC_PATH }}/main.ts"
TASKS_DEBUG_FLAGS: '{{ empty .DEBUG | ternary "" "--debug" }}'
tasks:
default:
cmds:
- task: format
- task: lint
- task: test
- task: build
format:
desc: Run all formatters
cmds:
- task: format:tasks
- task: format:vscripts
- task: format:panorama
lint:
desc: Run all linters
cmds:
- task: lint:tasks
- task: lint:vscripts
- task: lint:panorama
test:
desc: Run all tests
cmds:
- task: test:vscripts
clean:
desc: Remove all compiled, generated and linked files
cmd: bun run -- "{{ .TASKS_ENTRYPOINT }}" {{ .TASKS_DEBUG_FLAGS }} clean
link:
desc: Link source files to game directories
cmd: bun run -- "{{ .TASKS_ENTRYPOINT }}" {{ .TASKS_DEBUG_FLAGS }} link
launch:game:
desc: Launch Dota2
cmd: bun run -- "{{ .TASKS_ENTRYPOINT }}" {{ .TASKS_DEBUG_FLAGS }} launch game
launch:sdk:
desc: Launch SDK (Workshop Tools)
cmd: bun run -- "{{ .TASKS_ENTRYPOINT }}" {{ .TASKS_DEBUG_FLAGS }} launch sdk
build:
desc: Build everything
deps: [link]
cmd: bun run -- "{{ .TASKS_ENTRYPOINT }}" {{ .TASKS_DEBUG_FLAGS }} build
build:maps:
desc: Build maps
cmd: bun run -- "{{ .TASKS_ENTRYPOINT }}" {{ .TASKS_DEBUG_FLAGS }} build maps
build:panorama:scripts:
desc: Build panorama scripts
cmd: bun run -- "{{ .TASKS_ENTRYPOINT }}" {{ .TASKS_DEBUG_FLAGS }} build panorama-scripts
build:resources:
deps: [build:panorama:scripts]
desc: Build resources
cmd: bun run -- "{{ .TASKS_ENTRYPOINT }}" {{ .TASKS_DEBUG_FLAGS }} build resources
format:vscripts:
desc: Format vscripts
cmd: stylua --verify "{{ .VSCRIPTS_SRC_PATH }}"
lint:vscripts:
desc: Lint vscripts
cmd: selene "{{ .VSCRIPTS_SRC_PATH }}"
test:vscripts:
desc: Test vscripts
cmd: luarocks test
format:panorama:
desc: Format all panorama files
cmds:
- task: format:panorama:layouts
- task: format:panorama:scripts
- task: format:panorama:styles
lint:panorama:
desc: Lint all panorama files
cmds:
- task: lint:panorama:layouts
- task: lint:panorama:scripts
- task: lint:panorama:styles
format:panorama:layouts:
desc: Format panorama layouts
cmd: bun x -- prettier --write '{{ .PANORAMA_LAYOUTS_SRC_PATH }}/**/*.xml'
lint:panorama:layouts:
desc: Lint panorama layouts
cmd: echo "not implemented"
format:panorama:scripts:
desc: Format panorama scripts
cmd: bun x -- @biomejs/biome format --write --config-path "{{ .PANORAMA_SCRIPTS_SRC_PATH }}" "{{ .PANORAMA_SCRIPTS_SRC_PATH }}"
lint:panorama:scripts:
desc: Lint panorama scripts
cmd: bun x -- @biomejs/biome check --config-path "{{ .PANORAMA_SCRIPTS_SRC_PATH }}" "{{ .PANORAMA_SCRIPTS_SRC_PATH }}"
format:panorama:styles:
desc: Format panorama styles
cmds:
- bun x -- stylelint --fix "{{ .PANORAMA_STYLES_SRC_PATH }}"
- bun x -- prettier --write '{{ .PANORAMA_STYLES_SRC_PATH }}/**/*.css'
lint:panorama:styles:
desc: Lint panorama styles
cmd: bun x -- stylelint "{{ .PANORAMA_STYLES_SRC_PATH }}"
format:tasks:
desc: Format tasks
cmd: bun x -- @biomejs/biome format --write --config-path "{{ .TASKS_SRC_PATH }}" "{{ .TASKS_SRC_PATH }}"
lint:tasks:
desc: Lint tasks
cmd: bun x -- @biomejs/biome check --config-path "{{ .TASKS_SRC_PATH }}" "{{ .TASKS_SRC_PATH }}"