56 lines
2.0 KiB
JSON
56 lines
2.0 KiB
JSON
{
|
|
"tasks": {
|
|
// 🔧 Alias deno_make to `deno task make` to make it easier
|
|
"make": "deno run --allow-env --allow-read --allow-write=.deno-make.json --allow-run=deno https://deno.land/x/make/mod.ts $0",
|
|
// 💡 It is even possible to alias `deno task make <+task>` to `deno task <+task>` !
|
|
"start": "deno task make start",
|
|
"test": "deno task make test"
|
|
},
|
|
// 🍳 deno_make configuration
|
|
"+tasks": {
|
|
"start": { // ▶️ `deno task make start`
|
|
"description": "🍱 Start application",
|
|
"task": "deno run mod.ts",
|
|
"deno": { // ✨ Configure deno flags in a descriptive way
|
|
"run": { // ⚙️ `deno run`
|
|
"unstable": ["kv"], // ➡️ --unstable-kv
|
|
"permissions": {
|
|
"read": true, // ➡️ --allow-read
|
|
"run": false, // ➡️ --deny-run
|
|
"net": [ // ➡️ --allow-net=https://deno.land,https://example.com
|
|
"https://deno.land",
|
|
"https://example.com"
|
|
],
|
|
"prompt": false // ➡️ --no-prompt
|
|
}
|
|
}
|
|
},
|
|
"env": { // ✨ Configure environment variables directly
|
|
"FOO": true, // ➡️ Inherit current FOO environment variable
|
|
"BAR": "bar" // ➡️ Set BAR environment variable to "bar"
|
|
}
|
|
},
|
|
"test": { // ▶️ `deno task make test`
|
|
"description": "🧪 Run tests and print collected coverage",
|
|
"task": [ // ✨ Split long scripts for readability
|
|
"rm -rf .coverage &&",
|
|
"deno test &&",
|
|
"deno coverage .coverage"
|
|
],
|
|
"deno": {
|
|
"test": { // ⚙️ `deno test`
|
|
"unstable": true, // ➡️ --unstable
|
|
"permissions": { // ➡️ --allow-all
|
|
"all": true
|
|
},
|
|
"coverage": ".coverage", // ➡️ --coverage=.coverage
|
|
"parallel": true // ➡️ --parallel
|
|
},
|
|
"coverage": { // ⚙️ `deno coverage`
|
|
"quiet": true // ➡️ --quiet
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|