Skip to content

Commit 1fc011d

Browse files
committed
feat: add ability to generate a local library
1 parent 93f2907 commit 1fc011d

File tree

18 files changed

+296
-109
lines changed

18 files changed

+296
-109
lines changed

.github/workflows/build-templates.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595

9696
- name: Build package
9797
run: |
98-
yarn workspace create-react-native-library prepack
98+
yarn workspace create-react-native-library prepare
9999
100100
- name: Get working directory
101101
run: |
@@ -112,7 +112,8 @@ jobs:
112112
--author-url https://test.test \
113113
--repo-url https://test.test \
114114
--type ${{ matrix.type }} \
115-
--languages ${{ matrix.language }}
115+
--languages ${{ matrix.language }} \
116+
--no-local
116117
117118
- name: Cache dependencies of library
118119
id: library-yarn-cache
@@ -195,7 +196,7 @@ jobs:
195196
- name: Build library
196197
working-directory: ${{ env.work_dir }}
197198
run: |
198-
yarn prepack
199+
yarn prepare
199200
200201
- name: Build example (Web)
201202
working-directory: ${{ env.work_dir }}

.github/workflows/check-project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
run: yarn typecheck
2525

2626
- name: Build packages
27-
run: yarn lerna run prepack
27+
run: yarn lerna run prepare

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ yarn add --dev react-native-builder-bob
7878

7979
See options below for more details.
8080

81-
1. Add `bob` to your `prepack` step:
81+
1. Add `bob` to your `prepare` or `prepack` step:
8282

8383
```js
8484
"scripts": {
85-
"prepack": "bob build"
85+
"prepare": "bob build"
8686
}
8787
```
8888

@@ -226,7 +226,7 @@ This builds the project according to the configuration. This is usually run as p
226226

227227
```json
228228
"scripts": {
229-
"prepack": "bob build"
229+
"prepare": "bob build"
230230
}
231231
```
232232

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"scripts": {
1717
"lint": "eslint \"**/*.{js,ts,tsx}\"",
1818
"typecheck": "tsc --noEmit",
19-
"watch": "concurrently 'yarn typecheck --watch' 'lerna run --parallel prepack -- --watch'"
19+
"watch": "concurrently 'yarn typecheck --watch' 'lerna run --parallel prepare -- --watch'"
2020
},
2121
"devDependencies": {
2222
"@arkweid/lefthook": "^0.7.7",

packages/create-react-native-library/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"registry": "https://registry.npmjs.org/"
3838
},
3939
"scripts": {
40-
"prepack": "babel --extensions .ts,.tsx src --out-dir lib --ignore '**/__tests__/**' --source-maps --delete-dir-on-start"
40+
"prepare": "babel --extensions .ts,.tsx src --out-dir lib --ignore '**/__tests__/**' --source-maps --delete-dir-on-start"
4141
},
4242
"dependencies": {
4343
"cross-spawn": "^7.0.3",

0 commit comments

Comments
 (0)