-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdeno.jsonc
168 lines (158 loc) · 5.8 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
{
"name": "@nfnitloop/deno-embedder",
"version": "1.6.1",
"exports": {
".": "./src/mod.ts",
"./plugins/plugins": "./src/plugins/plugins.ts",
"./plugins/esbuild": "./src/plugins/esbuild.ts",
"./helpers/oak": "./src/helpers/oak.ts",
"./helpers/hono": "./src/helpers/hono.ts",
// Allows easily running the example server:
"./examples/with-embedder": "./examples/with-embedder/server.ts",
// Allows code examples which can be checked at build time, & run independently:
// !! Currently complains about complex export types. Fix with a wrapper w/ explicit types.
// TODO: "./examples/with-embedder/staticDir": "./examples/with-embedder/embed/static/dir.ts",
"./examples/oak": "./examples/with-embedder/server.ts",
"./examples/hono": "./examples/hono/server.ts",
// Needs to be exposed so that embedded files can import w/ JSR syntax. You shouldn't use this directly.
"./embed.ts": "./src/embed.ts"
},
"publish": {
"include": [
"README.md",
"src/**/*.ts",
"examples/with-embedder/**/*.ts",
"examples/hono/**/*.ts"
]
},
// WARNING!
// AFAIK, these task dependencies are declared properly. (And in fact, a bit conservatively to keep things simple)
// However, when run in parallel, I get errors that very much make it seem like dependency tasks haven't finished
// before running the next task.
// BUT, with the current state of the output of `deno task` when running parallel tasks, it's difficult to verify/debug this.
// TODO: Once better logging is implemented, come back and try to debug this again:
// See: https://github.com/denoland/deno/issues/27647
//
// Until then, run tasks with `DENO_JOBS=1 deno task ...`
"tasks": {
"test": {
"description": "Run the full test suite. Use DENO_JOBS=1",
"command": "echo Task test 'done'",
"dependencies": [
"check",
"examples:test",
"test:jsx",
"test:crashes"
]
},
// Since this directory has its own deno.jsonc, we need to test it explicitly:
"test:jsx": {
"command": "cd tests/jsx_config && deno test -A",
"dependencies": ["build"],
},
"test:crashes": {
"command": "cd tests/crashes && deno test -A --quiet",
"dependencies": ["build"]
},
// Runs code generation tasks. Depend on this to make sure file modifications have settled.
"build": {
"command": "echo Task build 'done'",
"dependencies": ["oak:build", "hono:build"]
},
"check": {
"command": "echo Task check 'done'",
"dependencies": [
"check:main",
"examples:check",
"check:publish",
"lints",
],
},
"check:main": {
"command": "./tools/with-exports.ts deno check --doc",
"dependencies": ["build"],
},
"check:publish": {
"command": "deno publish --dry-run --allow-dirty",
"dependencies": [
"build",
],
},
"check:without-embedder": {
"command": "cd examples/without-embedder; deno task check",
"dependencies": ["build"],
},
"examples:check": {
"command": "echo Task examples:check 'done'",
"dependencies": [
"oak:check",
"hono:check",
"check:without-embedder"
]
},
"examples:build": {
"command": "echo Task examples:build 'done'",
"dependencies": ["build"],
},
"examples:test": {
"command": "echo Task examples:test 'done'",
"dependencies": ["oak:test", "hono:test"],
},
"oak:build": "cd examples/with-embedder && deno task build-embeds",
"oak:check": {
"command": "cd examples/with-embedder; deno task check",
"dependencies": ["build"]
},
"oak:test": {
"command": "cd examples/with-embedder && deno test -A --trace-leaks",
"dependencies": ["build"]
},
"oak:start": {
"command": "cd examples/with-embedder && deno task start",
"dependencies": ["build"]
},
"hono:build": "cd examples/hono && deno task build-embeds",
"hono:check": {
"command": "cd examples/hono; deno task check",
"dependencies": ["build"]
},
"hono:test": {
"command": "cd examples/hono && deno test -A",
"dependencies": ["build"]
},
"hono:start": {
"command": "cd examples/hono && deno task start",
"dependencies": ["build"]
},
"lints": {
"command": "deno lint",
"dependencies": ["build", "lints:docs"],
},
"lints:docs": {
"command": "./tools/with-exports.ts deno doc --lint",
"dependencies": ["build"],
}
},
"lint": {
"rules": {
"exclude": [
// See: https://github.com/denoland/deno_lint/issues/1125
"prefer-const",
]
},
"exclude": [
"tests/jsr_paths/typescript_error",
"tests/jsr_paths/spaces_error",
// `deno lint` seems to think this is a .d.ts file.
"tests/jsr_paths/sample/static/foobar_.d.ts_.ts"
]
},
"test": {
"exclude": [
// Has example code that references theoretical modules:
"README.md",
// Pseudocode doc block example:
"src/helpers/hono.ts"
]
}
}