https://github.com/lowlighter/deno_make
🍳 Extends deno task runner with multiline commands, flags descriptors, descriptions and even more!
https://github.com/lowlighter/deno_make
Last synced: about 1 month ago
JSON representation
🍳 Extends deno task runner with multiline commands, flags descriptors, descriptions and even more!
- Host: GitHub
- URL: https://github.com/lowlighter/deno_make
- Owner: lowlighter
- License: mit
- Created: 2023-11-02T01:51:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-08T05:52:15.000Z (over 1 year ago)
- Last Synced: 2025-04-01T02:42:59.927Z (2 months ago)
- Language: TypeScript
- Homepage: https://deno.land/x/make
- Size: 482 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🍳🦕 deno make
_deno make_ integrates seemlessly with your existing `deno.jsonc` configuration file to provide an extended set of
features to the [deno](https://deno.land) task runner.## 🚀 Features
- Seamless integration with your existing `deno.jsonc` configuration file
- Set flags per deno subcommands in a descriptive way
- Set or inherit environment variables
- Write long tasks using arrays to improve readability
- Add descriptions to your tasks
- List and preview available tasks
- Replace positional and arguments easily

Learn more about the syntax in [`demo/deno.jsonc`](/demo/deno.jsonc) !
### 💭 But why ?
The default [deno task runner](https://docs.deno.com/runtime/manual/tools/task_runner) is great, but long tasks can
quickly become hard to read and maintain. This small script aims to solve this issue by providing a few extra features
for convenience.## 📚 Usage
### 1️⃣ Register _deno make_ in `deno.jsonc`
```jsonc
// deno.jsonc
{
"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"
}
}
```### 2️⃣ Configure _deno_make_ tasks in `deno.jsonc`
```jsonc
// deno.jsonc
{
// 🍳 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"
}
}
}
}
```> ℹ️ It is even possible to alias `deno task make <+task>` to `deno task <+task>` !
>
> ```jsonc
> // deno.jsonc
> {
> "tasks": {
> "start": "deno task make start",
> "test": "deno task make test"
> }
> }
> ```### 3️⃣ Run tasks with _deno_make_
```bash
deno task make <+task>
```> ℹ️ If _deno_make_ was aliased back to `deno task`, just use the following instead:
>
> ```bash
> deno task start
> ```To print the list of available tasks with their configuration, run _deno_make_ without arguments:
```bash
deno task make
```## 📜 License
```
MIT License
Copyright (c) 2023 Simon Lecoq
```