/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/scripts/featureflags/index.js
47 строк
1 KB
Alex Hunt
Reorganise shared script utils (#52473)
08 июл 2025, 16:10
08 июл 2025, 16:10
fc5e33b
Код
Авторство
О чём код?
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict-local * @format */ if (require.main === module) { require('../../../../scripts/shared/babelRegister').registerForMonorepo(); let command; if (process.argv.includes('--update')) { command = 'update'; } else if (process.argv.includes('--verify-unchanged')) { 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) { case 'update': require('./update').default(false); break; case 'verify-unchanged': require('./update').default(true); break; case 'print': require('./print').default(process.argv.includes('--json')); break; case 'help': console.log( 'Usage: node featureflags.js [--update|--verify-unchanged|--print|--help]', ); break; default: throw new Error('Unexpected script execution.'); } }