Skip to content

Document deno task as an installation method #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ https://raw.githubusercontent.com/skymethod/denoflare/v0.5.9/cli/cli.ts
<summary>Alternatives: shell function or no-install direct run command for CI build</summary>
<div>

### Shell function

You can also "install" by defining a shell function in your shell config to a `deno run` command.
This allows you to create multiple aliases with different permissions.

Expand All @@ -34,6 +36,8 @@ function denoflare {
}
```

### Run without install

Or, run without an install step at all, perhaps inside a CI build. Simply replace `denoflare` in our docs with the long-form `deno run` command.

e.g. instead of `denoflare serve x`
Expand All @@ -43,6 +47,19 @@ deno run --unstable --allow-read --allow-net --allow-env --allow-run \
https://raw.githubusercontent.com/skymethod/denoflare/v0.5.9/cli/cli.ts serve x
```

### Use with `deno task` (unstable)

Above can also be saved as a [deno task](https://deno.land/manual@v1.26.1/tools/task_runner):
```json
{
"tasks": {
"denoflare": "deno run --unstable --allow-read --allow-net --allow-env --allow-run https://raw.githubusercontent.com/skymethod/denoflare/v0.5.9/cli/cli.ts",
}
}
```

You can then run Denoflare simply `deno task denoflare`, e.g. `deno task denoflare serve x`

</div>
</details>

Expand Down