Skip to content
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

📝 Correct the documentation of the (un)install command root #1290

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions examples/tutorials/file_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ deno install --allow-net --allow-read jsr:@std/http@1/file-server
deno install --global --allow-net --allow-read jsr:@std/http@1/file-server
```

> This will install the script to the Deno installation root's bin directory,
> e.g. `/home/user/.deno/bin/file-server`.
> This will install the script to the Deno installation root, e.g.
> `/home/user/.deno/bin/file-server`.

You can now run the script with the simplified script name:

Expand Down
4 changes: 2 additions & 2 deletions runtime/reference/cli/_commands_reference.json
Original file line number Diff line number Diff line change
Expand Up @@ -3237,7 +3237,7 @@
},
{
"name": "install",
"about": "Installs dependencies either in the local project or globally to a bin directory.\n\n\u001b[32mLocal installation\u001b[39m\n\nAdd dependencies to the local project's configuration (\u001b[38;5;245mdeno.json / package.json\u001b[39m) and installs them\nin the package cache. If no dependency is specified, installs all dependencies listed in the config file.\nIf the \u001b[38;5;245m--entrypoint\u001b[39m flag is passed, installs the dependencies of the specified entrypoint(s).\n\n \u001b[38;5;245mdeno install\u001b[39m\n \u001b[38;5;245mdeno install jsr:@std/bytes\u001b[39m\n \u001b[38;5;245mdeno install npm:chalk\u001b[39m\n \u001b[38;5;245mdeno install --entrypoint entry1.ts entry2.ts\u001b[39m\n\n\u001b[32mGlobal installation\u001b[39m\n\nIf the \u001b[1m--global\u001b[22m flag is set, installs a script as an executable in the installation root's bin directory.\n\n \u001b[38;5;245mdeno install --global --allow-net --allow-read jsr:@std/http/file-server\u001b[39m\n \u001b[38;5;245mdeno install -g https://examples.deno.land/color-logging.ts\u001b[39m\n\nTo change the executable name, use \u001b[36m-n\u001b[39m/\u001b[36m--name\u001b[39m:\n \u001b[38;5;245mdeno install -g --allow-net --allow-read -n serve jsr:@std/http/file-server\u001b[39m\n\nThe executable name is inferred by default:\n - Attempt to take the file stem of the URL path. The above example would\n become \u001b[38;5;245mfile_server\u001b[39m.\n - If the file stem is something generic like \u001b[38;5;245mmain\u001b[39m, \u001b[38;5;245mmod\u001b[39m, \u001b[38;5;245mindex\u001b[39m or \u001b[38;5;245mcli\u001b[39m,\n and the path has no parent, take the file name of the parent path. Otherwise\n settle with the generic name.\n - If the resulting name has an \u001b[38;5;245m@...\u001b[39m suffix, strip it.\n\nTo change the installation root, use \u001b[36m--root\u001b[39m:\n \u001b[38;5;245mdeno install -g --allow-net --allow-read --root /usr/local jsr:@std/http/file-server\u001b[39m\n\nThe installation root is determined, in order of precedence:\n - \u001b[38;5;245m--root\u001b[39m option\n - \u001b[38;5;245mDENO_INSTALL_ROOT\u001b[39m environment variable\n - \u001b[38;5;245m$HOME/.deno\u001b[39m\n\nThese must be added to the path manually if required.",
"about": "Installs dependencies either in the local project or globally to a bin directory.\n\n\u001b[32mLocal installation\u001b[39m\n\nAdd dependencies to the local project's configuration (\u001b[38;5;245mdeno.json / package.json\u001b[39m) and installs them\nin the package cache. If no dependency is specified, installs all dependencies listed in the config file.\nIf the \u001b[38;5;245m--entrypoint\u001b[39m flag is passed, installs the dependencies of the specified entrypoint(s).\n\n \u001b[38;5;245mdeno install\u001b[39m\n \u001b[38;5;245mdeno install jsr:@std/bytes\u001b[39m\n \u001b[38;5;245mdeno install npm:chalk\u001b[39m\n \u001b[38;5;245mdeno install --entrypoint entry1.ts entry2.ts\u001b[39m\n\n\u001b[32mGlobal installation\u001b[39m\n\nIf the \u001b[1m--global\u001b[22m flag is set, installs a script as an executable in the installation root.\n\n \u001b[38;5;245mdeno install --global --allow-net --allow-read jsr:@std/http/file-server\u001b[39m\n \u001b[38;5;245mdeno install -g https://examples.deno.land/color-logging.ts\u001b[39m\n\nTo change the executable name, use \u001b[36m-n\u001b[39m/\u001b[36m--name\u001b[39m:\n \u001b[38;5;245mdeno install -g --allow-net --allow-read -n serve jsr:@std/http/file-server\u001b[39m\n\nThe executable name is inferred by default:\n - Attempt to take the file stem of the URL path. The above example would\n become \u001b[38;5;245mfile_server\u001b[39m.\n - If the file stem is something generic like \u001b[38;5;245mmain\u001b[39m, \u001b[38;5;245mmod\u001b[39m, \u001b[38;5;245mindex\u001b[39m or \u001b[38;5;245mcli\u001b[39m,\n and the path has no parent, take the file name of the parent path. Otherwise\n settle with the generic name.\n - If the resulting name has an \u001b[38;5;245m@...\u001b[39m suffix, strip it.\n\nTo change the installation root, use \u001b[36m--root\u001b[39m:\n \u001b[38;5;245mdeno install -g --allow-net --allow-read --root /usr/local/bin jsr:@std/http/file-server\u001b[39m\n\nThe installation root is determined, in order of precedence:\n - \u001b[38;5;245m--root\u001b[39m option\n - \u001b[38;5;245mDENO_INSTALL_ROOT\u001b[39m environment variable\n - \u001b[38;5;245m$HOME/.deno/bin\u001b[39m\n\nThese must be added to the path manually if required.",
"args": [
{
"name": "unstable-bare-node-builtins",
Expand Down Expand Up @@ -3791,7 +3791,7 @@
},
{
"name": "uninstall",
"about": "Uninstalls a dependency or an executable script in the installation root's bin directory.\n \u001b[38;5;245mdeno uninstall @std/dotenv chalk\u001b[39m\n \u001b[38;5;245mdeno uninstall --global file_server\u001b[39m\n\nTo change the installation root, use \u001b[36m--root\u001b[39m flag:\n \u001b[38;5;245mdeno uninstall --global --root /usr/local serve\u001b[39m\n\nThe installation root is determined, in order of precedence:\n - \u001b[38;5;245m--root\u001b[39m option\n - \u001b[38;5;245mDENO_INSTALL_ROOT\u001b[39m environment variable\n - \u001b[38;5;245m$HOME/.deno\u001b[39m",
"about": "Uninstalls a dependency or an executable script in the installation root.\n \u001b[38;5;245mdeno uninstall @std/dotenv chalk\u001b[39m\n \u001b[38;5;245mdeno uninstall --global file_server\u001b[39m\n\nTo change the installation root, use \u001b[36m--root\u001b[39m flag:\n \u001b[38;5;245mdeno uninstall --global --root /usr/local/bin serve\u001b[39m\n\nThe installation root is determined, in order of precedence:\n - \u001b[38;5;245m--root\u001b[39m option\n - \u001b[38;5;245mDENO_INSTALL_ROOT\u001b[39m environment variable\n - \u001b[38;5;245m$HOME/.deno/bin\u001b[39m",
"args": [
{
"name": "name-or-package",
Expand Down
7 changes: 3 additions & 4 deletions runtime/reference/cli/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ Use this command to install provide package or script as a globally available
binary on your system.

This command creates a thin, executable shell script which invokes `deno` using
the specified CLI flags and main module. It is placed in the installation root's
`bin` directory.
the specified CLI flags and main module. It is placed in the installation root.

Example:

Expand Down Expand Up @@ -105,14 +104,14 @@ The executable name is inferred by default:
To change the installation root, use `--root`:

```shell
deno install -g -N -R --root /usr/local jsr:@std/http/file-server
deno install -g -N -R --root /usr/local/bin jsr:@std/http/file-server
```

The installation root is determined, in order of precedence:

- `--root` option
- `DENO_INSTALL_ROOT` environment variable
- `$HOME/.deno`
- `$HOME/.deno/bin`

These must be added to the path manually if required.

Expand Down
2 changes: 1 addition & 1 deletion runtime/reference/cli/uninstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,5 @@ deno uninstall --global serve
Uninstall `serve` from a specific installation root

```bash
deno uninstall -g --root /usr/local serve
deno uninstall -g --root /usr/local/bin serve
```
Loading