diff --git a/scripts/rollup/build-all-release-channels.js b/scripts/rollup/build-all-release-channels.js index b7bc76a1aa..9ddfec0831 100644 --- a/scripts/rollup/build-all-release-channels.js +++ b/scripts/rollup/build-all-release-channels.js @@ -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.', diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js index cfa8710354..50e1b1750e 100644 --- a/scripts/rollup/build.js +++ b/scripts/rollup/build.js @@ -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;