diff options
author | Bartek Iwańczuk <biwanczuk@gmail.com> | 2019-06-14 17:43:06 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-14 08:43:06 -0700 |
commit | d00a4beec40faa9d2ddb482ed152f00c36ae2f42 (patch) | |
tree | 39609a02ba29741d01eb1657a5871837b3ecbf54 /installer/README.md | |
parent | 926594c53c600fd65f210806d7d6d841b02c3385 (diff) |
feat: installer (denoland/deno_std#489)
Original: https://github.com/denoland/deno_std/commit/a3015be14195df46486a49e5c791afba4dfe084a
Diffstat (limited to 'installer/README.md')
-rw-r--r-- | installer/README.md | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/installer/README.md b/installer/README.md new file mode 100644 index 000000000..309364fbc --- /dev/null +++ b/installer/README.md @@ -0,0 +1,70 @@ +# deno_installer + +Install remote or local script as executables. + +```` +## Installation + +`installer` can be install using iteself: + +```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 +$ 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 +> +> ✅ Successfully installed 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 +> +> ✅ Successfully installed file_server. +``` + +Use installed script: + +```sh +$ file_server +HTTP server listening on http://0.0.0.0:4500/ +``` + +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 +> +> ✅ Successfully installed file_server. +``` + +Show help + +```sh +$ deno_installer --help +> deno installer + Install remote or local script as executables. + +USAGE: + deno https://deno.land/std/installer/mod.ts 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. +``` |