From c7f2494b48310ac8e88b008c80b8214f505cdc2b Mon Sep 17 00:00:00 2001 From: Julian Laubstein Date: Fri, 17 Apr 2020 13:06:17 +0200 Subject: [PATCH 1/2] change boa cli binary name to just "boa" --- boa_cli/Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/boa_cli/Cargo.toml b/boa_cli/Cargo.toml index d347a4d5298..edfd86cbf2f 100644 --- a/boa_cli/Cargo.toml +++ b/boa_cli/Cargo.toml @@ -13,3 +13,7 @@ edition = "2018" [dependencies] Boa = { path = "../boa", features = ["serde-ast"], default-features = false } structopt = "0.3.13" + +[[bin]] +name = "boa" +path = "src/main.rs" From cc13369ef7395158f395790fe355a5b0756619d3 Mon Sep 17 00:00:00 2001 From: Julian Laubstein Date: Fri, 17 Apr 2020 15:29:23 +0200 Subject: [PATCH 2/2] Small fixes to accomodate cli name fix --- boa_cli/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boa_cli/src/main.rs b/boa_cli/src/main.rs index 38741d591d0..ac45a7da8df 100644 --- a/boa_cli/src/main.rs +++ b/boa_cli/src/main.rs @@ -18,7 +18,7 @@ use structopt::StructOpt; // https://docs.rs/structopt/0.3.11/structopt/#type-magic #[allow(clippy::option_option)] #[derive(Debug, StructOpt)] -#[structopt(author, about)] +#[structopt(author, about, name = "boa")] struct Opt { /// The JavaScript file(s) to be evaluated. #[structopt(name = "FILE", parse(from_os_str))] @@ -27,7 +27,7 @@ struct Opt { /// Dump the token stream to stdout with the given format. #[structopt( long, - short = "-t", + short = "t", value_name = "FORMAT", possible_values = &DumpFormat::variants(), case_insensitive = true, @@ -38,7 +38,7 @@ struct Opt { /// Dump the ast to stdout with the given format. #[structopt( long, - short = "-a", + short = "a", value_name = "FORMAT", possible_values = &DumpFormat::variants(), case_insensitive = true