Skip to content

Commit c7733f3

Browse files
committed
docs: add CLI docs
1 parent 1365628 commit c7733f3

3 files changed

Lines changed: 53 additions & 41 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
["introduction", "quick-start", "examples"]
1+
["introduction", "quick-start", "cli", "examples"]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# The CLI
2+
3+
React Native Brownfield comes with a batteries-included, all-in-one CLI tool called `brownie` that helps you build and publish your React Native app as a framework artifact for iOS (XCFramework) and Android (AAR).
4+
Additionally, it contains CLI utilities for other tools like the `@callstack/brownie` state management tool.
5+
6+
## Publish for iOS
7+
8+
Simply run `npx brownie package:ios` to create an XCFramework that you can later integrate into your native iOS app according to other instruction sections below.
9+
10+
Available arguments:
11+
12+
| Argument | Description |
13+
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
14+
| --verbose | Enable verbose logging |
15+
| --configuration | Explicitly set the scheme configuration to use. This option is case sensitive. |
16+
| --scheme | Explicitly set Xcode scheme to use |
17+
| --target | Explicitly set Xcode target to use |
18+
| --extra-params | Custom params that will be passed to xcodebuild command |
19+
| --export-extra-params | Custom params that will be passed to xcodebuild export archive command. Example: `--export-extra-params "-allowProvisioningUpdates"` |
20+
| --export-options-plist | Name of the export options file for archiving. Defaults to: `ExportOptions.plist` |
21+
| --build-folder | Location for iOS build artifacts. Corresponds to Xcode's "-derivedDataPath" |
22+
| --destination | Define destination(s) for the build. You can pass multiple destinations as separate values or repeated use of the flag. Values: "simulator", "device", or xcodebuild destinations |
23+
| --archive | Create an Xcode archive (IPA) of the build, required for uploading to App Store Connect or distributing to TestFlight |
24+
| --no-install-pods | Skip automatic CocoaPods installation |
25+
| --no-new-arch | Run React Native in legacy async architecture |
26+
| --local | Force local build with xcodebuild |
27+
| --verbose | Enable verbose logging |
28+
29+
## Build for Android
30+
31+
To build the artifact for Android without publishing, run `npx brownie package:android --module-name app`.
32+
33+
Available arguments:
34+
35+
| Argument | Description |
36+
| ------------- | ------------------------------------------------------------------------------------------------------------------------- |
37+
| --variant | Specify your app's build variant, which is constructed from build type and product flavor, e.g. 'debug' or 'freeRelease'. |
38+
| --module-name | AAR module name |
39+
| --verbose | Enable verbose logging |
40+
41+
## Publish locally for Android
42+
43+
To publish the `.aar`(s) built beforehand with `npx brownie package:android` to Maven local, which will allow Gradle to be able to load it from Maven local repository, run:
44+
45+
`npx brownie publish:android --module-name app`
46+
47+
| Argument | Description |
48+
| ------------- | ---------------------- |
49+
| --module-name | AAR module name |
50+
| --verbose | Enable verbose logging |

docs/docs/docs/getting-started/quick-start.mdx

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -34,47 +34,9 @@ First, we need to package our React Native app as an XCFramework or Fat-AAR.
3434

3535
#### With the built-in CLI
3636

37-
You can use the built-in CLI that comes with this library to package your React Native app for iOS and Android:
37+
For best experience, you can use the built-in `brownie` CLI that comes with this library to package your React Native app for iOS and Android.
3838

39-
##### Publish for iOS
40-
41-
Simply run `npx brownfield package:ios` to create an XCFramework that you can later integrate into your native iOS app according to other instruction sections below.
42-
43-
Available arguments:
44-
45-
| Argument | Description | Default |
46-
| ----------------- | -------------------------------------------------------------------------------------------- | ------------------------ | ----- |
47-
| --configuration | Explicitly set the scheme configuration to use. This option is case sensitive. | |
48-
| --scheme | Explicitly set Xcode scheme to use | |
49-
| --target | Explicitly set Xcode target to use | |
50-
| --build-folder | Location for iOS build artifacts. Corresponds to Xcode's "-derivedDataPath". | "build" |
51-
| --sdk | The SDK to build for (iphoneos/iphonesimulator); to build for multiple, separate with commas | iphoneos,iphonesimulator |
52-
| --no-install-pods | Skip installing pods before building | |
53-
| --verbose | | Enable verbose logging | false |
54-
55-
##### Build for Android
56-
57-
To build the artifact for Android without publishing, run `npx brownfield package:aar --module-name app`.
58-
59-
Available arguments:
60-
61-
| Argument | Description | Default |
62-
| ------------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----- |
63-
| --variant | Specify your app's build variant, which is constructed from build type and product flavor, e.g. 'debug' or 'freeRelease'. | 'debug' |
64-
| --module-name | AAR module name | '' (root project) |
65-
| --verbose | | Enable verbose logging | false |
66-
67-
##### Publish locally for Android
68-
69-
To publish the `.aar`(s) built beforehand with `react-native-brownfield package:aar` to Maven local, which will allow Gradle to be able to load it from Maven local repository, run:
70-
71-
`npx brownfield publish:android --module-name app`
72-
73-
| Argument | Description | Default |
74-
| ------------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----- |
75-
| --variant | Specify your app's build variant, which is constructed from build type and product flavor, e.g. 'debug' or 'freeRelease'. | 'debug' |
76-
| --module-name | AAR module name | '' (root project) |
77-
| --verbose | | Enable verbose logging | false |
39+
Follow [the CLI documentation here] to see how to use it.
7840

7941
#### With Rock
8042

0 commit comments

Comments
 (0)