summaryrefslogtreecommitdiff
path: root/installer/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'installer/README.md')
-rw-r--r--installer/README.md47
1 files changed, 33 insertions, 14 deletions
diff --git a/installer/README.md b/installer/README.md
index 7c7e9e5a7..6f0435730 100644
--- a/installer/README.md
+++ b/installer/README.md
@@ -4,50 +4,65 @@ Install remote or local script as executables.
## Installation
-`installer` can be install using iteself:
+`installer` can be install using itself:
```sh
deno -A https://deno.land/std/installer/mod.ts deno_installer https://deno.land/std/installer/mod.ts -A
```
-Installer uses `~/.deno/bin` to store installed scripts so make sure it's in `$PATH`
-
-```
-echo 'export PATH="$HOME/.deno/bin:$PATH"' >> ~/.bashrc # change this to your shell
-```
-
## Usage
Install script
```sh
+# remote script
$ deno_installer file_server https://deno.land/std/http/file_server.ts --allow-net --allow-read
-> Downloading: https://deno.land/std/http/file_server.ts
+> [1/1] Compiling https://deno.land/std/http/file_server.ts
>
> ✅ Successfully installed file_server.
+> ~/.deno/bin/file_server
# local script
$ deno_installer file_server ./deno_std/http/file_server.ts --allow-net --allow-read
-> Looking for: /dev/deno_std/http/file_server.ts
+> [1/1] Compiling file:///dev/deno_std/http/file_server.ts
>
> ✅ Successfully installed file_server.
+> ~/.deno/bin/file_server
```
-Use installed script:
+Run installed script:
```sh
$ file_server
HTTP server listening on http://0.0.0.0:4500/
```
-Update installed script
+## Custom installation directory
+
+By default installer uses `~/.deno/bin` to store installed scripts so make sure it's in your `$PATH`.
+
+```
+echo 'export PATH="$HOME/.deno/bin:$PATH"' >> ~/.bashrc # change this to your shell
+```
+
+If you prefer to change installation directory use `-d` or `--dir` flag.
+
+```
+$ deno_installer --dir /usr/local/bin file_server ./deno_std/http/file_server.ts --allow-net --allow-read
+> [1/1] Compiling file:///dev/deno_std/http/file_server.ts
+>
+> ✅ Successfully installed file_server.
+> /usr/local/bin/file_server
+```
+
+## Update installed script
```sh
$ deno_installer file_server https://deno.land/std/http/file_server.ts --allow-net --allow-read
> ⚠️ file_server is already installed, do you want to overwrite it? [yN]
> y
>
-> Downloading: https://deno.land/std/http/file_server.ts
+> [1/1] Compiling file:///dev/deno_std/http/file_server.ts
>
> ✅ Successfully installed file_server.
```
@@ -60,10 +75,14 @@ $ deno_installer --help
Install remote or local script as executables.
USAGE:
- deno https://deno.land/std/installer/mod.ts EXE_NAME SCRIPT_URL [FLAGS...]
+ deno -A https://deno.land/std/installer/mod.ts [OPTIONS] EXE_NAME SCRIPT_URL [FLAGS...]
ARGS:
EXE_NAME Name for executable
SCRIPT_URL Local or remote URL of script to install
- [FLAGS...] List of flags for script, both Deno permission and script specific flag can be used.
+ [FLAGS...] List of flags for script, both Deno permission and script specific
+ flag can be used.
+
+OPTIONS:
+ -d, --dir <PATH> Installation directory path (defaults to ~/.deno/bin)
```