Skip to content

Commit

Permalink
docs(readme): polish usage section
Browse files Browse the repository at this point in the history
  • Loading branch information
hasundue committed Oct 21, 2023
1 parent 27300ac commit 855b5d9
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,20 @@ commitAll(updates, {
### CLI

Although it is recommended to write your own scripts with the module, a
pre-built CLI is also provided as `cli.ts` for convenience, which is supposed to
cover most of the use cases.
pre-built CLI tool is also provided as `cli.ts` for convenience or a reference
implementation, which is supposed to cover most of the use cases.

#### Installation (optional)

The molt CLI can be installed globally with the following command:
The molt CLI can be installed globally with the following command, for example:

```sh
deno install --allow-env --allow-read --allow-net --allow-write --allow-run=git\
deno install --allow-env --allow-read --allow-write=. --allow-net --allow-run\
--name=molt https://deno.land/x/molt/cli.ts
```

However, it is recommended to run the remote script directly through `deno task`
for more precise control on permissions. Here's an example `deno.json`:
Alternatively, you may prefer to run the remote script directly through
`deno task` for reproducibility:

```sh
{
Expand All @@ -90,21 +90,19 @@ for more precise control on permissions. Here's an example `deno.json`:
}
```

Of course, you may use `--allow-all` instead at your own risk.

#### Update dependencies interactively

The most interactive interface is provided as `check` sub-command of `cli.ts`.

```sh
deno run --allow-env --allow-read --allow-net --allow-write=. --allow-run=git\
deno run --allow-env --allow-read --allow-net --allow-write=. --allow-run\
https://deno.land/x/molt/cli.ts check --import-map <file> <...entrypoints>
```

> [!Note]\
> Molt CLI automatically uses import maps defined in `deno.json` or `deno.jsonc`
> if available.\
> You can't, however, use import maps as an entrypoint.
> You can't, however, use import maps as entrypoints.
##### Example: Just check

Expand Down Expand Up @@ -197,15 +195,15 @@ The following limitations are imposed by the design of Molt:

See [issues] for other known limitations.

## Acknowledgments
## References

Molt is inspired by prior works such as

- [deno-udd](https://github.com/hayd/deno-udd)
- [dmm](https://github.com/drashland/dmm)
- [update](https://github.com/deaddeno/update)

and of full respect to the authors of these works.
and of full respect to the authors.

<!-- Links -->

Expand Down

0 comments on commit 855b5d9

Please sign in to comment.