You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/build.md
+28-18Lines changed: 28 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -182,24 +182,6 @@ Example:
182
182
183
183
Various targets to build for. The available targets are:
184
184
185
-
#### `codegen`
186
-
187
-
Generates the [React Native Codegen](https://reactnative.dev/docs/the-new-architecture/what-is-codegen) scaffold code, which is used with the New React Native Architecture.
188
-
189
-
You can ensure your Codegen generated scaffold code is stable through different React Native versions by shipping it with your library. You can find more in the [React Native Official Docs](https://reactnative.dev/docs/the-new-architecture/codegen-cli#including-generated-code-into-libraries).
190
-
191
-
#### `custom`
192
-
193
-
Define a custom build target. This is useful to call code generators during the build process.
194
-
195
-
##### `script`
196
-
197
-
Accepts a script name. `bob` will call the matching script defined under `package.json`'s `scripts` property. The build process **will throw and exit** if the target is defined without this option.
198
-
199
-
##### `clean`
200
-
201
-
You can pass a path to this option and `bob` will delete all the files on that path. The path is resolved relatively to where `build` was called from.
202
-
203
185
#### `commonjs`
204
186
205
187
Enable compiling source files with Babel and use CommonJS module system.
@@ -313,6 +295,34 @@ Setting this option to `true` will output 2 sets of type definitions: one for th
313
295
314
296
See the [ESM support](./esm.md) guide for more details.
315
297
298
+
#### `codegen`
299
+
300
+
Enable generating the [React Native Codegen](https://reactnative.dev/docs/the-new-architecture/what-is-codegen) scaffold code, which is used with the New React Native Architecture.
301
+
302
+
You can ensure your Codegen generated scaffold code is stable through different React Native versions by shipping it with your library. You can find more in the [React Native Official Docs](https://reactnative.dev/docs/the-new-architecture/codegen-cli#including-generated-code-into-libraries).
303
+
304
+
#### `custom`
305
+
306
+
Define a custom build target. This is useful to call custom scripts during when running `bob build`.
307
+
308
+
##### `script`
309
+
310
+
Name of the script to run. The script must be defined in the `package.json` file under the `scripts` property. This property is required.
311
+
312
+
This script is run asynchronously alongside the other build targets.
313
+
314
+
##### `clean`
315
+
316
+
Optionally, you can specify a path to cleanup before running the build script. The path is resolved relatively to where `build` was called from.
317
+
318
+
This is useful if your script generates output files. Cleaning the output folder before running the script ensures that the output doesn't contain stale files.
0 commit comments