Skip to content

Commit ab3a0f3

Browse files
author
Jack Pope
committed
Fix existing usage of names/type in build command
1 parent a6b7e43 commit ab3a0f3

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

scripts/rollup/build-all-release-channels.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,12 @@ const argv = yargs.wrap(yargs.terminalWidth()).options({
8080
type: 'choices',
8181
choices: ['circleci', 'github'],
8282
},
83-
bundle: {
84-
describe: 'Build the given bundle type.',
83+
type: {
84+
describe: `Build the given bundle type. (${Object.values(
85+
Bundles.bundleTypes
86+
)})`,
8587
requiresArg: false,
86-
type: 'choices',
87-
choices: [...Object.values(Bundles.bundleTypes)],
88-
},
89-
names: {
90-
describe: 'Build for matched bundle names. Example: "react-test,index.js".',
91-
requiresArg: false,
92-
type: 'array',
88+
type: 'string',
9389
},
9490
pretty: {
9591
describe: 'Force pretty output.',

scripts/rollup/build.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,15 @@ function parseRequestedNames(names, toCase) {
8484
}
8585
return result;
8686
}
87-
const argvType = Array.isArray(argv.bundle) ? argv.bundle : [argv.bundle];
88-
const requestedBundleTypes = argv.bundle ? argvType : [];
87+
const argvType = Array.isArray(argv.type) ? argv.type : [argv.type];
88+
const requestedBundleTypes = parseRequestedNames(
89+
argv.type ? argvType : [],
90+
'uppercase'
91+
);
8992

93+
const names = argv._;
9094
const requestedBundleNames = parseRequestedNames(
91-
argv.names ? argv.names : [],
95+
names ? names : [],
9296
'lowercase'
9397
);
9498
const forcePrettyOutput = argv.pretty;

0 commit comments

Comments
 (0)