Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions scripts/rollup/build-all-release-channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,12 @@ const argv = yargs.wrap(yargs.terminalWidth()).options({
type: 'choices',
choices: ['circleci', 'github'],
},
bundle: {
describe: 'Build the given bundle type.',
type: {
describe: `Build the given bundle type. (${Object.values(
Bundles.bundleTypes
)})`,
requiresArg: false,
type: 'choices',
choices: [...Object.values(Bundles.bundleTypes)],
},
names: {
describe: 'Build for matched bundle names. Example: "react-test,index.js".',
requiresArg: false,
type: 'array',
type: 'string',
},
pretty: {
describe: 'Force pretty output.',
Expand Down
10 changes: 7 additions & 3 deletions scripts/rollup/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,15 @@ function parseRequestedNames(names, toCase) {
}
return result;
}
const argvType = Array.isArray(argv.bundle) ? argv.bundle : [argv.bundle];
const requestedBundleTypes = argv.bundle ? argvType : [];
const argvType = Array.isArray(argv.type) ? argv.type : [argv.type];
const requestedBundleTypes = parseRequestedNames(
argv.type ? argvType : [],
'uppercase'
);

const names = argv._;
const requestedBundleNames = parseRequestedNames(
argv.names ? argv.names : [],
names ? names : [],
'lowercase'
);
const forcePrettyOutput = argv.pretty;
Expand Down