diff options
author | Jarrett Helton <jaydhelton@gmail.com> | 2020-08-12 11:32:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-12 17:32:03 +0200 |
commit | c4edd09816b3cc6ab992f85602388f2f344fcf0e (patch) | |
tree | 5b623b4e47688a2ce5c12a860e9697905cc2a757 /cli/flags.rs | |
parent | f5a4f1fdc04b24cdfbef83842b9c42b5032c4059 (diff) |
feat(bundle): add support for --reload flag (#6996)
Diffstat (limited to 'cli/flags.rs')
-rw-r--r-- | cli/flags.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cli/flags.rs b/cli/flags.rs index 49b577696..ce4d48dcc 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -394,6 +394,7 @@ fn install_parse(flags: &mut Flags, matches: &clap::ArgMatches) { fn bundle_parse(flags: &mut Flags, matches: &clap::ArgMatches) { ca_file_arg_parse(flags, matches); config_arg_parse(flags, matches); + reload_arg_parse(flags, matches); importmap_arg_parse(flags, matches); unstable_arg_parse(flags, matches); lock_args_parse(flags, matches); @@ -771,6 +772,7 @@ fn bundle_subcommand<'a, 'b>() -> App<'a, 'b> { ) .arg(Arg::with_name("out_file").takes_value(true).required(false)) .arg(ca_file_arg()) + .arg(reload_arg()) .arg(importmap_arg()) .arg(unstable_arg()) .arg(config_arg()) @@ -2277,6 +2279,23 @@ mod tests { } #[test] + fn bundle_with_reload() { + let r = + flags_from_vec_safe(svec!["deno", "bundle", "--reload", "source.ts"]); + assert_eq!( + r.unwrap(), + Flags { + reload: true, + subcommand: DenoSubcommand::Bundle { + source_file: "source.ts".to_string(), + out_file: None, + }, + ..Flags::default() + } + ); + } + + #[test] fn run_importmap() { let r = flags_from_vec_safe(svec![ "deno", |