summaryrefslogtreecommitdiff
path: root/docs/linking_to_external_code/reloading_modules.md
diff options
context:
space:
mode:
authorChris Knight <cknight1234@gmail.com>2020-06-10 18:43:44 +0100
committerGitHub <noreply@github.com>2020-06-10 13:43:44 -0400
commit1120dfe3f2d5732eb2eda0996726efd33554e42c (patch)
tree71609ded4e26f747f2f7d873f641bc3911f65159 /docs/linking_to_external_code/reloading_modules.md
parentbe8bacaaa4258089e5a0cf4f1d8f53db8e534d4b (diff)
doc: improve linking to external code docs (#6158)
Diffstat (limited to 'docs/linking_to_external_code/reloading_modules.md')
-rw-r--r--docs/linking_to_external_code/reloading_modules.md24
1 files changed, 18 insertions, 6 deletions
diff --git a/docs/linking_to_external_code/reloading_modules.md b/docs/linking_to_external_code/reloading_modules.md
index 94b87b711..01300a5c3 100644
--- a/docs/linking_to_external_code/reloading_modules.md
+++ b/docs/linking_to_external_code/reloading_modules.md
@@ -1,22 +1,34 @@
## Reloading modules
-You can invalidate your local `DENO_DIR` cache using the `--reload` flag. It's
+By default, a module in the cache will be reused without fetching or
+re-compiling it. Sometimes this is not desirable and you can force deno to
+refetch and recompile modules into the cache. You can invalidate your local
+`DENO_DIR` cache using the `--reload` flag of the `deno cache` subcommand. It's
usage is described below:
-To reload everything
+### To reload everything
-`--reload`
+```ts
+deno cache --reload my_module.ts
+
+```
+
+### To reload specific modules
Sometimes we want to upgrade only some modules. You can control it by passing an
argument to a `--reload` flag.
-To reload all standard modules
+To reload all v0.55.0 standard modules
-`--reload=https://deno.land/std`
+```ts
+deno cache --reload=https://deno.land/std@v0.55.0 my_module.ts
+```
To reload specific modules (in this example - colors and file system copy) use a
comma to separate URLs
-`--reload=https://deno.land/std/fs/copy.ts,https://deno.land/std/fmt/colors.ts`
+```ts
+deno cache --reload=https://deno.land/std/fs/copy.ts,https://deno.land/std/fmt/colors.ts my_module.ts
+```
<!-- Should this be part of examples? -->