1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-03 04:48:52 -05:00

Remove broken feature: --deps

This commit is contained in:
Ryan Dahl 2018-10-26 14:14:50 -04:00
parent a99aaf5def
commit 6bbf0777b1
2 changed files with 1 additions and 16 deletions

View file

@ -84,14 +84,6 @@ export default function denoMain() {
os.exit(1);
}
// handle `--deps`
if (startResMsg.depsFlag()) {
for (const dep of compiler.getModuleDependencies(inputFn, `${cwd}/`)) {
console.log(dep);
}
os.exit(0);
}
compiler.recompile = startResMsg.recompileFlag();
compiler.run(inputFn, `${cwd}/`);
}

View file

@ -25,7 +25,6 @@ pub struct DenoFlags {
pub allow_write: bool,
pub allow_net: bool,
pub allow_env: bool,
pub deps_flag: bool,
pub types_flag: bool,
}
@ -70,7 +69,6 @@ pub fn set_flags(
opts.optflag("v", "version", "Print the version.");
opts.optflag("r", "reload", "Reload cached remote resources.");
opts.optflag("", "v8-options", "Print V8 command line options.");
opts.optflag("", "deps", "Print module dependencies.");
opts.optflag("", "types", "Print runtime TypeScript declarations.");
let mut flags = DenoFlags::default();
@ -106,9 +104,6 @@ pub fn set_flags(
if matches.opt_present("allow-env") {
flags.allow_env = true;
}
if matches.opt_present("deps") {
flags.deps_flag = true;
}
if matches.opt_present("types") {
flags.types_flag = true;
}
@ -148,15 +143,13 @@ fn test_set_flags_2() {
#[test]
fn test_set_flags_3() {
let (flags, rest, _) =
set_flags(svec!["deno", "-r", "--deps", "script.ts", "--allow-write"])
.unwrap();
set_flags(svec!["deno", "-r", "script.ts", "--allow-write"]).unwrap();
assert_eq!(rest, svec!["deno", "script.ts"]);
assert_eq!(
flags,
DenoFlags {
reload: true,
allow_write: true,
deps_flag: true,
..DenoFlags::default()
}
);