mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
RN: Default featureflags Script to Update (#51708)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51708 Changes `yarn featureflags` to default to `--update` when no options are supplied. Provides a way to display the available options with a new `--help` option. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D75692119 fbshipit-source-id: 50d25c5f12c7646159872661c93ebe8c42f44788
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8343045404
commit
95113e9dfd
+11
-4
@@ -19,6 +19,11 @@ if (require.main === module) {
|
||||
command = 'verify-unchanged';
|
||||
} else if (process.argv.includes('--print')) {
|
||||
command = 'print';
|
||||
} else if (process.argv.includes('--help')) {
|
||||
command = 'help';
|
||||
} else {
|
||||
console.log('Defaulting to `--update`. See all options using `--help`.');
|
||||
command = 'update';
|
||||
}
|
||||
|
||||
switch (command) {
|
||||
@@ -31,10 +36,12 @@ if (require.main === module) {
|
||||
case 'print':
|
||||
require('./print').default(process.argv.includes('--json'));
|
||||
break;
|
||||
default:
|
||||
console.error(
|
||||
'Usage: node featureflags.js [--update|--verify-unchanged|--print]',
|
||||
case 'help':
|
||||
console.log(
|
||||
'Usage: node featureflags.js [--update|--verify-unchanged|--print|--help]',
|
||||
);
|
||||
process.exit(1);
|
||||
break;
|
||||
default:
|
||||
throw new Error('Unexpected script execution.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user