summaryrefslogtreecommitdiff
path: root/src/flags.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/flags.rs')
-rw-r--r--src/flags.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/flags.rs b/src/flags.rs
index ecc60922e..d68bb5e09 100644
--- a/src/flags.rs
+++ b/src/flags.rs
@@ -30,6 +30,7 @@ pub struct DenoFlags {
pub types: bool,
pub prefetch: bool,
pub info: bool,
+ pub fmt: bool,
}
pub fn get_usage(opts: &Options) -> String {
@@ -115,6 +116,9 @@ fn set_recognized_flags(
if matches.opt_present("info") {
flags.info = true;
}
+ if matches.opt_present("fmt") {
+ flags.fmt = true;
+ }
if !matches.free.is_empty() {
rest.extend(matches.free);
@@ -152,6 +156,7 @@ pub fn set_flags(
opts.optflag("", "types", "Print runtime TypeScript declarations.");
opts.optflag("", "prefetch", "Prefetch the dependencies.");
opts.optflag("", "info", "Show source file related info");
+ opts.optflag("", "fmt", "Format code.");
let mut flags = DenoFlags::default();