-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
deno.jsonc
308 lines (308 loc) · 10.9 KB
/
deno.jsonc
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
{
"description": "Lightweight HTML templating library for any-side rendering",
"keywords": ["html", "templating", "ssr", "csr", "ssg", "reactive"],
"license": "MIT",
"author": "Simon Lecoq (@lowlighter)",
"funding": "https://github.com/sponsors/lowlighter",
"homepage": "https://github.com/lowlighter/mizu",
"repository": {
"type": "git",
"url": "git+https://github.com/lowlighter/mizu.git"
},
"tasks": {
// Lint tasks
"lint": {
"description": "Lint everything",
"command": "sleep 0",
"dependencies": ["lint:code", "lint:doc", "lint:pkg", "lint:fmt"]
},
"lint:code": {
"description": "Lint code",
"command": "cd $INIT_CWD && deno lint"
},
"lint:doc": {
"description": "Lint documentation",
"command": "cd $INIT_CWD && deno doc --lint $(deno task resolve:glob --break --separator=' ' '@mizu/**/*.ts' '**/*.ts')"
},
"lint:pkg": {
"description": "Lint package",
"command": "cd $INIT_CWD && deno publish --quiet --dry-run --allow-dirty"
},
"lint:fmt": {
"description": "Check code formatting",
"command": "cd $INIT_CWD && deno fmt --check"
},
// Test tasks
"test:deno": {
"description": "Test code (deno)",
"command": "cd $INIT_CWD && deno test --allow-read --allow-env --allow-net --parallel --doc --clean --coverage"
},
"test:node": {
"description": "Test code (node)",
"command": "cd $INIT_CWD && npm test"
},
"test:bun": {
"description": "Test code (bun)",
"command": "cd $INIT_CWD && bun test"
},
// Build tasks
"build:lockfile-deno": {
"description": "Build deno.lock",
"command": "rm -rf deno.lock package.json package-lock.json && deno install && git checkout package.json package-lock.json"
},
"build:lockfile-node": {
"description": "Build package-lock.json",
"command": "rm -rf deno.lock package-lock.json node_modules && npm install && git checkout deno.lock"
},
"build:www": {
"description": "Build static website",
"command": "deno run --quiet --allow-read --allow-env --allow-net --allow-sys=osRelease --allow-write=www/.pages --allow-run --location=http://localhost:4649 www/build.ts",
"dependencies": ["build:www-clean"]
},
"build:www-coverage": {
"description": "Build static website coverage section",
"command": "deno test --allow-read --allow-env --allow-net --parallel --clean --coverage; rm -rf www/.pages/coverage && deno coverage --html && mv coverage/html www/.pages/coverage && deno run --quiet --allow-read --allow-net=img.shields.io --allow-write=www/.pages/coverage jsr:@libs/bundle/ts/cli/coverage --root=www/.pages/coverage",
"dependencies": ["build:www-clean"]
},
"build:www-clean": {
"description": "Clean static website artifacts",
"command": "rm -rf www/.pages && mkdir -p www/.pages"
},
// Install tasks
"install:deno": {
"description": "Install project (deno)",
"command": "deno install"
},
"install:node": {
"description": "Install project (node)",
"command": "npm install"
},
"install:bun": {
"description": "Install project (bun)",
"command": "bun install"
},
// Continuous integration tasks
"ci:setup-deno-deploy": {
"description": "Setup deno deploy environment",
"command": "deno task build:lockfile-deno && rm -rf package.json package-lock.json && deno run --allow-read --allow-env --allow-write=.imports.json,/home/runner/work/_temp .github/tools/github_actions_deno_deploy.ts",
"dependencies": ["build:www", "render:mermaid"]
},
"ci:setup-github-pages": {
"description": "Setup github pages environment",
"command": "mv www/.pages _site",
"dependencies": ["build:www", "build:www-coverage", "render:mermaid"]
},
"ci:bump-versions": {
"description": "Bump versions based on each package changes",
"command": "deno run --allow-read=@mizu --allow-write=$(deno task resolve:glob \"@mizu/**/deno.jsonc\") --allow-env --allow-run=git .github/tools/bump_versions.ts"
},
"ci:autogenerate": {
"description": "Autogenerate files",
"command": "deno task build:lockfile-deno && deno task build:lockfile-node",
"dependencies": ["repo:fill-scopes", "render:readmes"]
},
// Development tasks
"qa": {
"description": "Lint, test and print coverage (deno)",
"command": "cd $INIT_CWD && deno coverage --detailed --include=$INIT_CWD",
"dependencies": ["lint", "test:deno"]
},
"serve": {
"description": "Serve static website locally",
"command": "deno serve --allow-read --allow-env --allow-net --allow-sys=osRelease --allow-write --allow-run --port=4649 --location=http://localhost:4649 www/serve.ts"
},
"deploy": {
"description": "Deploy static website on deno deploy",
"command": "deno run --allow-read --allow-env --allow-sys --allow-net=cdn.deno.land,dash.deno.com --no-prompt jsr:@deno/deployctl deploy",
"dependencies": ["build:www"]
},
"reinstall": {
"description": "Alias for task reinstall:deno",
"command": "sleep 0",
"dependencies": ["reinstall:deno"]
},
"reinstall:deno": {
"description": "Clean and reinstall dependencies (deno)",
"command": "rm -rf node_modules deno.lock package.json package-lock.json && deno install"
},
"reinstall:node": {
"description": "Clean and reinstall dependencies (node)",
"command": "rm -rf node_modules package-lock.json && npm install"
},
// Miscellaneous tasks
"repo:fill-scopes": {
"description": "Fill scopes in repository files",
"command": " deno run --allow-read --allow-write=.github/ISSUE_TEMPLATE,.github/labeler.yml --allow-run=deno .github/tools/fill_github_scopes.ts"
},
"render:mermaid": {
"description": "Render mermaid diagrams",
"command": "deno run --allow-read --allow-net=127.0.0.1,localhost,cdn.jsdelivr.net --allow-write=www/static/rendering.svg --allow-run=$(deno task resolve:browser-path) .github/tools/generate_mermaid.ts www/misc/rendering.mermaid www/static/rendering.svg"
},
"render:readmes": {
"description": "Render packages README.md using their mod.html",
"command": "deno run --quiet --allow-read --allow-env --allow-sys=osRelease --allow-write=$(deno task resolve:glob \"@mizu/**/README.md\"),README.md --allow-run=deno .github/tools/mod_html_to_readme_md.ts $INIT_CWD"
},
"resolve:browser-path": {
"description": "Resolve browser path (browser is installed if not present in cache)",
"command": "ASTRAL_QUIET_INSTALL=1 deno run --allow-read --allow-env=ASTRAL_QUIET_INSTALL --allow-net=googlechromelabs.github.io,storage.googleapis.com --allow-write=.cache .github/tools/browser_path.ts"
},
"resolve:glob": {
"description": "Resolve glob patterns",
"command": "deno run --allow-read .github/tools/expand_glob.ts"
}
},
"nodeModulesDir": "auto",
"imports": {
// Dependencies
"@libs/markdown": "jsr:@libs/markdown@^2.0.2",
"@libs/reactive": "jsr:@libs/reactive@^5.0.2",
"@libs/typing": "jsr:@libs/typing@^3.1.2",
"@libs/xml": "jsr:@libs/xml@^6.0.4",
"@std/assert": "jsr:@std/assert@^1.0.9",
"@std/async": "jsr:@std/async@^1.0.9",
"@std/html": "jsr:@std/html@^1.0.3",
"@std/io": "jsr:@std/io@~0.225.0",
"@std/path": "jsr:@std/path@^1.0.8",
"@std/regexp": "jsr:@std/regexp@^1.0.0",
"jsdom": "npm:jsdom@^25.0.1",
// Deno deploy dependencies
"@libs/bundle/ts": "jsr:@libs/bundle@^12.6.4/ts",
"@libs/typing/func": "jsr:@libs/typing@^3.1.2/func",
"@std/http/unstable-route": "jsr:@std/http@^1.0.12/unstable-route",
"@std/html/unstable-is-valid-custom-element-name": "jsr:@std/html@^1.0.3/unstable-is-valid-custom-element-name",
// Development dependencies
"@dprint/formatter": "jsr:@dprint/formatter@^0.4.1",
"@libs/testing": "jsr:@libs/testing@^4.0.1",
"@std/fmt": "jsr:@std/fmt@^1.0.3",
// Development server dependencies
"@www/": "./www/",
"@deno/doc": "jsr:@deno/doc@^0.161.3",
"@libs/bundle": "jsr:@libs/bundle@^12.6.4",
"@libs/logger": "jsr:@libs/logger@^3.1.3",
"@lowlighter/std-http": "jsr:@lowlighter/std-http@^1.0.11",
"@std/collections": "jsr:@std/collections@^1.0.9",
"@std/http": "jsr:@std/http@^1.0.12",
"@std/jsonc": "jsr:@std/jsonc@^1.0.1",
"@std/text": "jsr:@std/text@^1.0.9",
// Tooling dependencies
"@tools/": "./.github/tools/",
"@actions/core": "npm:@actions/core@^1.11.1",
"@astral/astral": "jsr:@astral/astral@~0.5",
"@libs/git": "jsr:@libs/git@^0.1.3",
"@libs/run": "jsr:@libs/run@^3.0.2",
"@std/cli": "jsr:@std/cli@^1.0.8",
"@std/fs": "jsr:@std/fs@^1.0.6",
"@std/semver": "jsr:@std/semver@^1.0.3",
"@std/yaml": "jsr:@std/yaml@^1.0.5"
},
"workspace": [
"@mizu/bind",
"@mizu/clean",
"@mizu/code",
"@mizu/custom-element",
"@mizu/eval",
"@mizu/event",
"@mizu/for",
"@mizu/html",
"@mizu/http",
"@mizu/if",
"@mizu/internal",
"@mizu/is",
"@mizu/markdown",
"@mizu/mizu",
"@mizu/model",
"@mizu/mustache",
"@mizu/once",
"@mizu/ref",
"@mizu/refresh",
"@mizu/render",
"@mizu/set",
"@mizu/show",
"@mizu/skip",
"@mizu/test",
"@mizu/text",
"@mizu/toc",
"@mizu/unstable"
// https://github.com/lucacasonato/esbuild_deno_loader/issues/156
// "@mizu/*"
],
"fmt": {
"semiColons": false,
"lineWidth": 280,
"exclude": [
".cache",
"www/.pages",
"**/coverage",
"**/node_modules"
]
},
"lint": {
"rules": {
"include": [
"ban-untagged-todo",
"eqeqeq",
"no-console",
"no-eval",
"no-external-import",
"no-inferrable-types",
"no-sync-fn-in-async-fn",
"no-throw-literal",
"single-var-declarator",
"triple-slash-reference"
],
"exclude": [
"no-window"
]
},
"exclude": [
".cache",
"www/.pages",
"www/html/mizu/examples/bun",
"www/html/mizu/examples/node",
"**/coverage",
"**/node_modules"
]
},
"publish": {
"exclude": [
".devcontainer/**",
".github/**",
"@mizu/**/*.html",
"@mizu/**/*_test.ts",
"www/**",
"CONTRIBUTING.md",
"vercel.json"
]
},
"compilerOptions": {
"lib": [
"dom",
"dom.iterable",
"deno.ns"
],
"useUnknownInCatchVariables": false
},
"deploy": {
"project": "eef27b1b-755a-4828-bf83-a073e41e5677",
"entrypoint": "www/serve.ts",
"include": [
".imports.json",
"@mizu/**",
"www/.pages/**",
"www/api/**",
"www/*.ts",
"**/deno.jsonc",
"deno.lock"
],
"exclude": [
"@mizu/**/*.html",
"@mizu/**/*_test.ts",
"@mizu/**/README.md",
"@mizu/**/coverage",
"@mizu/**/node_modules",
"www/build.ts",
"coverage",
"**/node_modules"
]
}
}