Skip to content

Commit 0a40e95

Browse files
authored
fix: Add a no-discover flag to disable automatic discovery (#13)
1 parent d29ac16 commit 0a40e95

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/options/options.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ export const options: OptionDefinition[] = [
1010
{ name: "bundlerConfig", type: String, defaultValue: "" },
1111
{ name: "concurrency", type: Number },
1212
{ name: "discover", type: Boolean, defaultValue: true },
13+
{ name: "no-discover", type: Boolean },
1314
{ name: "indexFilePath", type: String, defaultValue: undefined },
1415
];
1516

1617
const args = cmdArgs(options, { partial: true });
17-
const { dir, write, verbose, prefix, sep: separator, bundlerConfig, concurrency, discover, indexFilePath } = args;
18+
const { dir, write, verbose, prefix, sep: separator, bundlerConfig, concurrency, indexFilePath } = args;
19+
const discover = args.discover && !args["no-discover"];
20+
1821
if (!dir) {
1922
console.error("Error: dir argument not supplied");
2023
process.exit(1);

0 commit comments

Comments
 (0)