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: README.md
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,14 +41,6 @@ Just as an example, this is a command we have in one of the packages: `babel --e
41
41
42
42
Bob wraps tools such as `babel` and `typescript` to simplify these common tasks across multiple projects. It's tailored specifically to React Native projects to minimize the configuration required.
43
43
44
-
## Installation
45
-
46
-
Open a Terminal in your project, and run:
47
-
48
-
```sh
49
-
yarn add --dev @react-native-community/bob
50
-
```
51
-
52
44
## Usage
53
45
54
46
### Creating a new project
@@ -65,6 +57,12 @@ The difference from [create-react-native-module](https://github.com/brodybits/cr
65
57
66
58
### Configuring an existing project
67
59
60
+
First, install Bob in your project. Open a Terminal in your project, and run:
61
+
62
+
```sh
63
+
yarn add --dev @react-native-community/bob
64
+
```
65
+
68
66
To configure your project to use Bob, open a Terminal and run `yarn bob init` for automatic configuration.
69
67
70
68
To configure your project manually, follow these steps:
@@ -86,15 +84,15 @@ To configure your project manually, follow these steps:
86
84
87
85
See options below for more details.
88
86
89
-
1. Add `bob` to your `prepare` step:
87
+
2. Add `bob` to your `prepare` step:
90
88
91
89
```js
92
90
"scripts": {
93
91
"prepare":"bob build"
94
92
}
95
93
```
96
94
97
-
1. Configure the appropriate entry points:
95
+
3. Configure the appropriate entry points:
98
96
99
97
```json
100
98
"main": "lib/commonjs/index.js",
@@ -113,14 +111,14 @@ To configure your project manually, follow these steps:
113
111
114
112
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.
115
113
116
-
1. Add the output directory to `.gitignore` and `.eslintignore`
114
+
4. Add the output directory to `.gitignore` and `.eslintignore`
117
115
118
116
```gitignore
119
117
# generated files by bob
120
118
lib/
121
119
```
122
120
123
-
1. Add the output directory to `jest.modulePathIgnorePatterns` if you use [Jest](https://jestjs.io)
121
+
5. Add the output directory to `jest.modulePathIgnorePatterns` if you use [Jest](https://jestjs.io)
0 commit comments