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
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,11 +73,11 @@ To configure your project manually, follow these steps:
73
73
4. Configure the appropriate entry points:
74
74
75
75
```json
76
-
"source": "./src/index.tsx",
77
76
"main": "./lib/module/index.js",
78
77
"types": "./lib/typescript/src/index.d.ts",
79
78
"exports": {
80
79
".": {
80
+
"source": "./src/index.tsx",
81
81
"types": "./lib/typescript/src/index.d.ts",
82
82
"default": "./lib/module/index.js"
83
83
},
@@ -91,7 +91,6 @@ To configure your project manually, follow these steps:
91
91
92
92
Here is what each of these fields mean:
93
93
94
-
-`source`: The path to the source code. It is used by `react-native-builder-bob` to detect the correct output files and provide better error messages.
95
94
-`main`: The entry point for legacy setups that don't support the `exports` field. See [Compatibility](./esm.md#compatibility) for more details.
96
95
-`types`: The entry point for the TypeScript definitions for legacy setups with `moduleResolution: node10` or `moduleResolution: node`.
97
96
-`exports`: The entry points for tools that support the `exports` field in `package.json` - such as Node.js 12+, modern browsers and tools. See [the ESM support guide](./esm.md) for more details.
Copy file name to clipboardExpand all lines: docs/pages/esm.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,7 @@ To make use of the output files, ensure that your `package.json` file contains t
40
40
"types": "./lib/typescript/src/index.d.ts",
41
41
"exports": {
42
42
".": {
43
+
"source": "./src/index.tsx",
43
44
"types": "./lib/typescript/src/index.d.ts",
44
45
"default": "./lib/module/index.js"
45
46
},
@@ -51,8 +52,9 @@ The `main` field is for tools that don't support the `exports` field (e.g. [Metr
51
52
52
53
The `exports` field is used by Node.js 12+, modern browsers and tools to determine the correct entry point. The entrypoint is specified in the `.` key and will be used when the library is imported or required directly (e.g. `import 'my-library'` or `require('my-library')`).
53
54
54
-
Here, we specify 2 conditions:
55
+
Here, we specify 3 conditions:
55
56
57
+
-`source`: A custom condition used by `react-native-builder-bob` to determine the source file for the library.
56
58
-`types`: Used for the TypeScript definitions.
57
59
-`default`: Used for the actual JS code when the library is imported or required.
Copy file name to clipboardExpand all lines: packages/create-react-native-library/templates/common/CONTRIBUTING.md
-14Lines changed: 0 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,20 +35,6 @@ To invoke **Nitrogen**, use the following command:
35
35
yarn nitrogen
36
36
```
37
37
38
-
<% } -%>
39
-
<% if (project.native) { -%>
40
-
You also need to install the required ruby gems for the iOS project with [bundler](https://bundler.io/). To install the gems, run the following command in the root directory:
41
-
42
-
```sh
43
-
bundle install
44
-
```
45
-
46
-
Now, you can install [CocoaPods](https://cocoapods.org/) for the iOS project. To do this, run the following command in the `example/ios` directory:
47
-
48
-
```sh
49
-
bundle exec pod install
50
-
```
51
-
52
38
<% } -%>
53
39
The [example app](/example/) demonstrates usage of the library. You need to run it to test any changes you make.
0 commit comments