Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update yarn build options (facebook#30422)
Improve command documentation and make it easier to build specific bundle types **Before** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --ci Run tests in CI [choices: "circleci", "github"] ✨ Done in 0.69s. ``` **After** ``` % yarn build --help yarn run v1.22.19 $ node ./scripts/rollup/build-all-release-channels.js --help Options: --help Show help [boolean] --version Show version number [boolean] --releaseChannel, -r Build the given release channel. [string] [choices: "experimental", "stable"] --index, -i Worker id. [number] --total, -t Total number of workers. [number] --bundle Build the given bundle type. [choices: "NODE_ES2015", "ESM_DEV", "ESM_PROD", "NODE_DEV", "NODE_PROD", "NODE_PROFILING", "BUN_DEV", "BUN_PROD", "FB_WWW_DEV", "FB_WWW_PROD", "FB_WWW_PROFILING", "RN_OSS_DEV", "RN_OSS_PROD", "RN_OSS_PROFILING", "RN_FB_DEV", "RN_FB_PROD", "RN_FB_PROFILING", "BROWSER_SCRIPT"] --ci Run tests in CI [choices: "circleci", "github"] --names Build for matched bundle names. Example: "react-test,index.js". [array] --pretty Force pretty output. [boolean] --sync-fbsource Include to sync build to fbsource. [string] --sync-www Include to sync build to www. [string] --unsafe-partial Do not clean ./build first. [boolean] ✨ Done in 0.61s. ``` Changes - Use yargs to document existing options: `pretty`, `sync-fbsource`, `sync-www`, `unsafe-partial`. - Move `_` arg to `names` option for consistency with other options and discoverability through yargs help - Add `bundle` option in place of `argv.type` that allows choices of any BundleType to be passed in directly.
- Loading branch information