mirror of
https://github.com/react/react-native.git
synced 2026-10-28 17:44:56 +08:00
Summary: This PR fixes simple typos found in error messages: - **apple.js**: Fixed "boostrap" -> "bootstrap" in error messages (lines 67, 169) - **CppHelpers.js**: Fixed "informations" -> "information" in error messages (lines 75, 87, 101) Note: "information" is an uncountable noun in English and should not be pluralized. Changelog: [Internal] [Changed] - Pull Request resolved: https://github.com/facebook/react-native/pull/55849 Test Plan: These are typo fixes in error message strings. No code behavior changes. Reviewed By: cipolleschi Differential Revision: D94905006 Pulled By: cortinico fbshipit-source-id: a6a7185cf3aeb8739212a06115100ede097b0b4c
@react-native/core-cli-utils
A collection of utilites to help Frameworks build their React Native CLI tooling. This is not intended to be used directly use users of React Native.
Usage
import { Command } from 'commander';
import cli from '@react-native/core-cli-utils';
import debug from 'debug';
const android = new Command('android');
const frameworkFindsAndroidSrcDir = "...";
const tasks = cli.clean.android(frameworkFindsAndroidSrcDir);
const log = debug('fancy-framework:android');
android
.command('clean')
.description(cli.clean.android)
.action(async () => {
const log = debug('fancy-framework:android:clean');
log(`🧹 let me clean your Android caches`);
// Add other caches your framework needs besides the normal React Native caches
// here.
for (const task of tasks) {
try {
log(`\t ${task.label}`);
// See: https://github.com/sindresorhus/execa#lines
const {stdout} = await task.action({ lines: true })
log(stdout.join('\n\tGradle: '));
} catch (e) {
log(`\t ⚠️ whoops: ${e.message}`);
}
}
});
And you'd be using it like this:
$ ./fancy-framework android clean
🧹 let me clean your Android caches
Gradle: // a bunch of gradle output
Gradle: ....
Features
"@react-native/core-cli-utils/version.js"contains the platform and tooling version requirements for react-native.
Contributing
Changes to this package can be made locally and linked against your app. Please see the Contributing guide.