Skip to content

Commit 64a7a82

Browse files
committed
docs: move opting out codegen to bottom
1 parent 634cdc6 commit 64a7a82

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

docs/pages/build.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,23 @@ yarn add --dev react-native-builder-bob
112112

113113
> If you're building TypeScript definition files, also make sure that the `types` field points to a correct path. Depending on the project configuration, the path can be different for you than the example snippet (e.g. `lib/typescript/index.d.ts` if you have only the `src` directory and `rootDir` is not set).
114114
115+
1. Add the output directory to `.gitignore` and `.eslintignore`
116+
117+
```gitignore
118+
# generated files by bob
119+
lib/
120+
```
121+
122+
This makes sure that you don't accidentally commit the generated files to git or get lint errors for them.
123+
124+
1. Add the output directory to `jest.modulePathIgnorePatterns` if you use [Jest](https://jestjs.io)
125+
126+
```json
127+
"modulePathIgnorePatterns": ["<rootDir>/lib/"]
128+
```
129+
130+
This makes sure that Jest doesn't try to run the tests in the generated files.
131+
115132
1. Configure [React Native Codegen](https://reactnative.dev/docs/the-new-architecture/what-is-codegen)
116133

117134
You can follow the [Official Codegen Setup Guide](https://reactnative.dev/docs/the-new-architecture/using-codegen) to enable Codegen.
@@ -131,23 +148,6 @@ yarn add --dev react-native-builder-bob
131148
},
132149
```
133150

134-
1. Add the output directory to `.gitignore` and `.eslintignore`
135-
136-
```gitignore
137-
# generated files by bob
138-
lib/
139-
```
140-
141-
This makes sure that you don't accidentally commit the generated files to git or get lint errors for them.
142-
143-
1. Add the output directory to `jest.modulePathIgnorePatterns` if you use [Jest](https://jestjs.io)
144-
145-
```json
146-
"modulePathIgnorePatterns": ["<rootDir>/lib/"]
147-
```
148-
149-
This makes sure that Jest doesn't try to run the tests in the generated files.
150-
151151
And we're done 🎉
152152

153153
## Options

0 commit comments

Comments
 (0)