Skip to content

Commit d91b4fc

Browse files
Added "--tag" and "--scope" arguments to the CLI
1 parent a6d76a1 commit d91b4fc

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/cli/parse-args.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as commandLineArgs from "command-line-args";
2-
import { Options } from "../options";
2+
import { Access, Options } from "../options";
33
import { ExitCode } from "./exit-code";
44
import { usageText } from "./help";
55

@@ -24,11 +24,13 @@ export function parseArgs(argv: string[]): ParsedArgs {
2424
{ name: "token", type: String },
2525
{ name: "registry", type: String },
2626
{ name: "package", type: String, defaultOption: true },
27+
{ name: "tag", type: String },
28+
{ name: "access", type: String },
29+
{ name: "dry-run", type: Boolean },
2730
{ name: "debug", alias: "d", type: Boolean },
2831
{ name: "quiet", alias: "q", type: Boolean },
2932
{ name: "version", alias: "v", type: Boolean },
3033
{ name: "help", alias: "h", type: Boolean },
31-
{ name: "dry-run", type: Boolean }
3234
],
3335
{ argv }
3436
);
@@ -48,9 +50,11 @@ export function parseArgs(argv: string[]): ParsedArgs {
4850
token: args.token as string,
4951
registry: args.registry as string,
5052
package: args.package as string,
53+
tag: args.tag as string,
54+
access: args.access as Access,
55+
dryRun: args["dry-run"] as boolean,
5156
debug: args.debug ? console.debug : undefined,
5257
quiet: args.quiet as boolean,
53-
dryRun: args["dry-run"] as boolean
5458
}
5559
};
5660

0 commit comments

Comments
 (0)