diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2019-01-15 09:19:58 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-01-15 12:19:58 -0500 |
commit | c870cf40823a4900278f8ddf03489338c169878b (patch) | |
tree | 80c171f7bb36c988f459a4d0ee248a40d3feb34b /src/flags.rs | |
parent | ac6ac5037ff53f4e7b9693aeed24f1e3ef1339ad (diff) |
Add --prefetch flag for deps prefetch without running (#1475)
Diffstat (limited to 'src/flags.rs')
-rw-r--r-- | src/flags.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/flags.rs b/src/flags.rs index f2d0150b1..970aceb3c 100644 --- a/src/flags.rs +++ b/src/flags.rs @@ -28,6 +28,7 @@ pub struct DenoFlags { pub allow_env: bool, pub allow_run: bool, pub types: bool, + pub prefetch: bool, } pub fn get_usage(opts: &Options) -> String { @@ -107,6 +108,9 @@ fn set_recognized_flags( if matches.opt_present("types") { flags.types = true; } + if matches.opt_present("prefetch") { + flags.prefetch = true; + } if !matches.free.is_empty() { rest.extend(matches.free); @@ -142,6 +146,7 @@ pub fn set_flags( opts.optflag("r", "reload", "Reload cached remote resources."); opts.optflag("", "v8-options", "Print V8 command line options."); opts.optflag("", "types", "Print runtime TypeScript declarations."); + opts.optflag("", "prefetch", "Prefetch the dependencies."); let mut flags = DenoFlags::default(); |