-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmise.toml
More file actions
142 lines (110 loc) · 4.31 KB
/
mise.toml
File metadata and controls
142 lines (110 loc) · 4.31 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
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
134
135
136
137
138
139
140
141
142
[tools]
deno = "2.7"
[tasks."install"]
description = "Install all dependencies"
run = [{ task = "install:deno" }]
[tasks."install:deno"]
description = "Install Deno dependencies"
run = ["mise exec -- deno install"]
[tasks."clean"]
description = "Clean project environment"
run = [{ task = "clean:devel" }]
[tasks."clean:deno"]
description = "Clean deno artifacts"
run = ["rm -rf ./node_modules/ ./deno.lock"]
[tasks."clean:devel"]
description = "Clean development artifacts"
run = ["rm -rf ./dist/"]
[tasks."clean:storage"]
description = "Clean storage (careful)"
run = ["rm -rf ./storage/"]
[tasks."clean:git"]
description = "Clean git (careful)"
run = [{ task = "clean:git:untracked" }, { task = "clean:git:gc" }, { task = "clean:git:hooks" }]
[tasks."clean:git:gc"]
run = ["git gc --aggressive --prune"]
[tasks."clean:git:hooks"]
run = ["rm -rf ./.git/hooks/"]
[tasks."clean:git:untracked"]
run = ["git clean -d -x -i"]
[tasks."build"]
description = "Build (server)"
run = [{ task = "install" }, { task = "build:server" }]
[tasks."build:server"]
description = "Build server"
sources = ['src/**/*.ts', "deno.json", "deno.lock", 'rolldown.config.ts']
outputs = ['dist/backend.js', 'dist/backend.js.map']
run = ["mise exec -- deno x -A rolldown -c rolldown.config.ts"]
[tasks."build:standalone_"]
hide = true
run = [
{ task = "build:server" },
"mise exec -- deno compile --no-check --allow-all --exclude=./node_modules/ --exclude=./package.json --include=./dist/backend.js.map --output=${STANDALONE_OUTPUT:-./dist/backend} ${STANDALONE_TARGET:+--target=${STANDALONE_TARGET}} ./dist/backend.js"
]
[tasks."build:standalone"]
description = "Build standalone binary (current os/arch)"
run = [{ task = "build:standalone_" }]
[tasks."build:standalone:darwin-arm64"]
description = "Build standalone binary"
env = { STANDALONE_OUTPUT = "./dist/backend.darwin-arm64", STANDALONE_TARGET = "aarch64-apple-darwin" }
run = [{ task = "build:standalone_" }]
[tasks."build:standalone:linux-amd64"]
description = "Build standalone binary"
env = { STANDALONE_OUTPUT = "./dist/backend.linux-amd64", STANDALONE_TARGET = "x86_64-unknown-linux-gnu" }
run = [{ task = "build:standalone_" }]
[tasks."build:standalone:linux-arm64"]
description = "Build standalone binary"
env = { STANDALONE_OUTPUT = "./dist/backend.linux-arm64", STANDALONE_TARGET = "aarch64-unknown-linux-gnu" }
run = [{ task = "build:standalone_" }]
[tasks."build:standalone:windows-amd64"]
description = "Build standalone binary"
env = { STANDALONE_OUTPUT = "./dist/backend.windows-amd64.exe", STANDALONE_TARGET = "x86_64-pc-windows-msvc" }
run = [{ task = "build:standalone_" }]
[tasks."test"]
description = "Run all tests"
run = [{ task = "install" }, "mise exec -- deno test -A"]
[tasks."fix"]
description = "Run all formatters"
run = [{ task = "install" }, { task = "fix:oxfmt" }, { task = "fix:oxlint" }]
[tasks."fix:oxfmt"]
description = "Run oxfmt formatter"
run = ["mise exec -- deno x -A oxfmt **"]
[tasks."fix:oxlint"]
description = "Run oxlint formatter"
run = ["mise exec -- deno x -A oxlint --fix **"]
[tasks."lint"]
description = "Run all linters"
run = [{ task = "install" }, { task = "lint:deno" }, { task = "lint:oxlint" }]
[tasks."lint:deno"]
description = "Run Deno linter"
run = ["mise exec -- deno check --quiet"]
[tasks."lint:oxlint"]
description = "Run oxlint linter"
run = ["mise exec -- deno x -A oxlint **"]
[tasks."tidy"]
description = "Tidy all"
run = [{ task = "tidy:deno" }]
[tasks."tidy:deno"]
description = "Tidy Deno dependencies"
run = [{ task = "clean:deno" }, { task = "install:deno" }]
[tasks."start"]
description = "Start backend"
run = [{ task = "start:server" }]
[tasks."start:dev"]
alias = "dev"
description = "Start devel server"
run = [
{ task = "install" },
"JSPB_DEBUG_DATABASE_EPHEMERAL=true JSPB_LOG_VERBOSITY=4 mise exec -- deno run -A ./src/index.ts"
]
[tasks."start:build"]
description = "Start dedicated server"
run = [{ task = "build:server" }, { task = "start:server" }]
[tasks."start:server"]
description = "Start dedicated server (requires built backend)"
dir = "{{ config_root }}/dist/"
run = ["JSPB_LOG_VERBOSITY=4 mise exec -- deno run -A ./backend.js"]
[tasks."start:server:inspector"]
description = "Start dedicated server (requires built backend)"
dir = "{{ config_root }}/dist/"
run = ["JSPB_LOG_VERBOSITY=4 mise exec -- deno run -A --inspect-brk ./backend.js"]