BentoumiTech / BentoumiTech/denox

Terser syntax through well-documented defaults and inference

Open
#16 4 comments 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
135
Forks
11
PR merge metrics
No merged PRs in 30d

Description

## Issue Type

- Feature Request

It appears that one of the primary goals of this project is to reduce typing. I think every programmer loves that.

It might be possible to allow for even terser syntax by establishing and documenting some sensible defaults and inference behavior. Here are some suggested considerations:

**Default script:**

For example, one could use the command `denox run`, which would be expanded to `denox run default`. (I gave `default` as the example here, but maybe you like `main`, etc.)

Example:

`deno-workspace.yaml`
```yaml
scripts:
default:
file: main.ts
deno_options:
allow-net: example.com
```

`shell`
```shell
> denox run
# equal to:
# deno run --allow-net=example.com main.ts
```

**Inferring file from script:**

Likewise, in `deno-workspace.scripts`:
If a script does not provide a value for `file`, it could be inferred from its script key—this would allow it to be an optional property if people would like to organize scripts directly by file name. This practice provides the advantage of native terminal tab-completion and also promotes an organizational structure which aligns with the workspace filesystem.

Example:

This:
```yaml
scripts:
main.ts:
file: main.ts
deno_options:
allow-net: example.com
```

could be equal to:
```yaml
scripts:
main.ts:
deno_options:
allow-net: example.com
```

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the workspace script configuration described in deno-workspace.yaml and the denox run entry point. Compare the proposed denox run shorthand with the existing script behavior, then assess the two inference cases: a default script and a script key used as its file. Done means the behavior and its defaults are implemented and documented, with the examples working as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, typescript
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.