Skip to content

Commit b1579b2

Browse files
committed
refactor: rename brownie CLI to brownfield to resolve ambiguity
1 parent fde8697 commit b1579b2

15 files changed

Lines changed: 50 additions & 56 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
# == IntegratedTester ==
8989

9090
- name: Generate Brownie stores
91-
run: yarn run brownie:codegen
91+
run: yarn run brownfield:codegen
9292

9393
- name: Build integrated Android tester app
9494
run: yarn run build:tester-integrated:android
@@ -98,12 +98,12 @@ jobs:
9898
- name: Package AAR with the Brownfield CLI
9999
run: |
100100
cd apps/RNApp
101-
yarn run brownie:package:android
101+
yarn run brownfield:package:android
102102
103103
- name: Publish AAR artifact to Maven Local
104104
run: |
105105
cd apps/RNApp
106-
yarn run brownie:publish:android
106+
yarn run brownfield:publish:android
107107
108108
- name: Verify debug AAR exists in Maven Local
109109
run: stat ~/.m2/repository/com/rnapp/brownfieldlib/0.0.1-local/brownfieldlib-0.0.1-local-debug.aar
@@ -179,7 +179,7 @@ jobs:
179179
- name: Package iOS framework with the Brownfield CLI
180180
run: |
181181
cd apps/RNApp
182-
yarn run brownie:package:ios
182+
yarn run brownfield:package:ios
183183
184184
# == AppleApp ==
185185

apps/RNApp/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"ios": "react-native run-ios",
88
"build:example:android-rn": "react-native build-android",
99
"build:example:ios-rn": "react-native build-ios",
10-
"brownie:package:android": "brownie package:android --module-name :BrownfieldLib --variant release",
11-
"brownie:publish:android": "brownie publish:android --module-name :BrownfieldLib",
12-
"brownie:package:ios": "brownie package:ios --scheme BrownfieldLib --configuration Release",
10+
"brownfield:package:android": "brownfield package:android --module-name :BrownfieldLib --variant release",
11+
"brownfield:publish:android": "brownfield publish:android --module-name :BrownfieldLib",
12+
"brownfield:package:ios": "brownfield package:ios --scheme BrownfieldLib --configuration Release",
1313
"lint": "eslint .",
1414
"start": "react-native start",
1515
"test": "jest"

apps/TesterIntegrated/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"start": "react-native start",
77
"build:tester-integrated:android": "cd kotlin && ./gradlew assembleDebug",
88
"build:tester-integrated:ios": "cd swift && xcodebuild -workspace SwiftExample.xcworkspace -scheme SwiftExample -configuration Release -sdk iphonesimulator build CODE_SIGNING_ALLOWED=NO -derivedDataPath ./build",
9-
"brownie:codegen": "brownie codegen"
9+
"brownfield:codegen": "brownfield codegen"
1010
},
1111
"dependencies": {
1212
"@callstack/brownie": "*",

docs/docs/brownie/codegen.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Code Generation
22

3-
The Brownie CLI generates native types from your TypeScript store definitions.
3+
The Brownfield CLI generates native types from your TypeScript store definitions.
44

55
## Usage
66

77
```bash
8-
brownie codegen # Generate for all configured platforms
9-
brownie codegen -p swift # Generate Swift only
10-
brownie codegen --platform kotlin # Generate Kotlin only (coming soon)
11-
brownie --help # Show help
12-
brownie --version # Show version
8+
brownfield codegen # Generate for all configured platforms
9+
brownfield codegen -p swift # Generate Swift only
10+
brownfield codegen --platform kotlin # Generate Kotlin only (coming soon)
11+
brownfield --help # Show help
12+
brownfield --version # Show version
1313
```
1414

1515
## Configuration

docs/docs/brownie/overview.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ Brownie is a shared state management library for React Native brownfield apps. I
2525

2626
```
2727
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
28-
│ TypeScript │──────▶│ Brownie CLI │──────▶│ Swift types │
29-
│ Store Schema │ │ (codegen) │ │ (generated) │
28+
│ TypeScript │──────▶│ Brownfield CLI │──────▶│ Swift types │
29+
│ Store Schema │ │ (codegen) │ │ (generated) │
3030
└─────────────────┘ └──────────────────┘ └─────────────────┘
3131
```
3232

3333
1. Define your store shape in a `*.brownie.ts` file using TypeScript
34-
2. Run `brownie codegen` to generate native types
34+
2. Run `brownfield codegen` to generate native types
3535
3. Use `useStore` in React Native and `Store<T>` in Swift
3636
4. State changes sync automatically between both sides
3737

@@ -49,7 +49,7 @@ Add to your `Podfile`:
4949

5050
```ruby
5151
pre_install do |installer|
52-
system("npx", "brownie", "codegen", "-p", "swift")
52+
system("npx", "brownfield", "codegen", "-p", "swift")
5353
end
5454
```
5555

docs/docs/docs/cli/brownfield.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# Usage with Brownfield package
22

3-
The `brownie` CLI provides utilities for building & packaging artifacts for brownfield projects that use the `@callstack/react-native-brownfield` library.
3+
The `brownfield` CLI provides utilities for building & packaging artifacts for brownfield projects that use the `@callstack/react-native-brownfield` library.
44

55
## Usage
66

77
```bash
8-
brownie package:android --module-name :BrownfieldLib --variant release # Package AAR with BrownfieldLib module in release variant
9-
brownie publish:android --module-name :BrownfieldLib # Publish all build variants of BrownfieldLib module to Maven local
10-
brownie package:ios --scheme BrownfieldLib --configuration Release # Package XCFramework for BrownfieldLib scheme in Release configuration
11-
brownie codegen --help # Show help
12-
brownie --version # Show version
8+
brownfield package:android --module-name :BrownfieldLib --variant release # Package AAR with BrownfieldLib module in release variant
9+
brownfield publish:android --module-name :BrownfieldLib # Publish all build variants of BrownfieldLib module to Maven local
10+
brownfield package:ios --scheme BrownfieldLib --configuration Release # Package XCFramework for BrownfieldLib scheme in Release configuration
11+
brownfield codegen --help # Show help
12+
brownfield --version # Show version
1313
```
1414

1515
## iOS
1616

1717
### Build for iOS
1818

19-
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.
19+
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.
2020

2121
Available arguments:
2222

@@ -39,12 +39,12 @@ Available arguments:
3939

4040
## Android
4141

42-
For Android, building happens in two steps: first, you build (`brownie package:android`) the AAR artifact(s) with your module, in the appropriate build variant(s), and then you `brownie publish:android` them to Maven local.
42+
For Android, building happens in two steps: first, you build (`brownfield package:android`) the AAR artifact(s) with your module, in the appropriate build variant(s), and then you `brownfield publish:android` them to Maven local.
4343
From there, native applications can consume your library from the local Maven repository.
4444

4545
### Build for Android
4646

47-
To build the artifact for Android without publishing, run `npx brownie package:android --module-name app`.
47+
To build the artifact for Android without publishing, run `npx brownfield package:android --module-name app`.
4848

4949
Available arguments:
5050

@@ -56,9 +56,9 @@ Available arguments:
5656

5757
### Publish locally for Android
5858

59-
To publish the `.aar`(s) built beforehand with `npx brownie publish:android` to Maven local, which will allow Gradle to be able to load it from Maven local repository, run:
59+
To publish the `.aar`(s) built beforehand with `npx brownfield publish:android` to Maven local, which will allow Gradle to be able to load it from Maven local repository, run:
6060

61-
`npx brownie publish:android --module-name app`
61+
`npx brownfield publish:android --module-name app`
6262

6363
| Argument | Description |
6464
| ------------- | ---------------------- |

docs/docs/docs/cli/brownie.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Usage with Brownie package
22

3-
The `brownie codegen` CLI command generates Brownie state management library native store types from TypeScript schema.
3+
The `brownfield codegen` CLI command generates Brownie state management library native store types from TypeScript schema.
44

55
## Usage
66

77
```bash
8-
brownie codegen # Generate for all configured platforms
9-
brownie codegen -p swift # Generate Swift only
10-
brownie codegen --platform kotlin # Generate Kotlin only
11-
brownie codegen --help # Show help for Brownie state management codegen
12-
brownie --version # Show version
8+
brownfield codegen # Generate for all configured platforms
9+
brownfield codegen -p swift # Generate Swift only
10+
brownfield codegen --platform kotlin # Generate Kotlin only
11+
brownfield codegen --help # Show help for Brownie state management codegen
12+
brownfield --version # Show version
1313
```
1414

1515
## Configuration

docs/docs/docs/cli/introduction.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Unified brownfield CLI
22

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).
3+
The React Native Brownfield ecosystem comes with a batteries-included, all-in-one CLI tool called `brownfield` that helps you build and publish your React Native app as a framework artifact for iOS (XCFramework) and Android (AAR).
44
Additionally, it contains CLI utilities for other tools like the `@callstack/brownie` state management tool.
55

66
> ![NOTE]
7-
> The `brownie` CLI is a unified tool serving both the needs of `@callstack/react-native-brownfield` and `@callstack/brownie` packages. The name `brownie` does not mean it is only meant for `@callstack/brownie` state management tool; it is the main CLI for React Native Brownfield as well.
8-
> Technically, the CLI itself is encapsulated in the `@callstack/brownie-cli` package, which is a dependency of both `@callstack/react-native-brownfield` and `@callstack/brownie`. Therefore, installing either of the packages will bring the `brownie` CLI tool to your project.
7+
> The `brownfield` CLI is a unified tool serving both the needs of `@callstack/react-native-brownfield` and `@callstack/brownie` packages. The name `brownfield` does not mean it is only meant for `@callstack/brownie` state management tool; it is the main CLI for React Native Brownfield as well.
8+
> Technically, the CLI itself is encapsulated in the `@callstack/brownie-cli` package, which is a dependency of both `@callstack/react-native-brownfield` and `@callstack/brownie`. Therefore, installing either of the packages will bring the `brownfield` CLI tool to your project.
99
1010
## Usage
1111

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ First, we need to package our React Native app as an XCFramework or Fat-AAR.
3434

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

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.
37+
For best experience, you can use the built-in `brownfield` CLI that comes with this library to package your React Native app for iOS and Android.
3838

3939
Follow [the CLI documentation here](/docs/getting-started/cli) to see how to use it.
4040

packages/brownie/ArchitectureOverview.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Shared state management between React Native and Native apps (iOS).
66

77
```
88
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
9-
│ TypeScript │──────▶│ Brownie CLI │──────▶│ Swift/Kotlin │
10-
│ Schema Spec │ │ (codegen) │ │ data types │
9+
│ TypeScript │──────▶│ brownfield CLI │──────▶│ Swift/Kotlin │
10+
│ Schema Spec │ │ (codegen) │ │ data types │
1111
└─────────────────┘ └──────────────────┘ └─────────────────┘
1212
1313
┌─────────────────────────────────────────┘
@@ -29,16 +29,16 @@ Shared state management between React Native and Native apps (iOS).
2929

3030
## CLI command
3131

32-
The `brownie codegen` CLI command generates native store types from TypeScript schema.
32+
The `brownfield codegen` CLI command generates native store types from TypeScript schema.
3333

3434
### Usage
3535

3636
```bash
37-
brownie codegen # Generate for all configured platforms
38-
brownie codegen -p swift # Generate Swift only
39-
brownie codegen --platform kotlin # Generate Kotlin only
40-
brownie codegen --help # Show help for Brownie state management codegen
41-
brownie --version # Show version
37+
brownfield codegen # Generate for all configured platforms
38+
brownfield codegen -p swift # Generate Swift only
39+
brownfield codegen --platform kotlin # Generate Kotlin only
40+
brownfield codegen --help # Show help for Brownie state management codegen
41+
brownfield --version # Show version
4242
```
4343

4444
### Configuration

0 commit comments

Comments
 (0)