Skip to content

Commit

Permalink
feat: add ability to generate a local library
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Sep 25, 2023
1 parent 93f2907 commit 1fc011d
Show file tree
Hide file tree
Showing 18 changed files with 296 additions and 109 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:

- name: Build package
run: |
yarn workspace create-react-native-library prepack
yarn workspace create-react-native-library prepare
- name: Get working directory
run: |
Expand All @@ -112,7 +112,8 @@ jobs:
--author-url https://test.test \
--repo-url https://test.test \
--type ${{ matrix.type }} \
--languages ${{ matrix.language }}
--languages ${{ matrix.language }} \
--no-local
- name: Cache dependencies of library
id: library-yarn-cache
Expand Down Expand Up @@ -195,7 +196,7 @@ jobs:
- name: Build library
working-directory: ${{ env.work_dir }}
run: |
yarn prepack
yarn prepare
- name: Build example (Web)
working-directory: ${{ env.work_dir }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
run: yarn typecheck

- name: Build packages
run: yarn lerna run prepack
run: yarn lerna run prepare
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ yarn add --dev react-native-builder-bob

See options below for more details.

1. Add `bob` to your `prepack` step:
1. Add `bob` to your `prepare` or `prepack` step:

```js
"scripts": {
"prepack": "bob build"
"prepare": "bob build"
}
```

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

```json
"scripts": {
"prepack": "bob build"
"prepare": "bob build"
}
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"lint": "eslint \"**/*.{js,ts,tsx}\"",
"typecheck": "tsc --noEmit",
"watch": "concurrently 'yarn typecheck --watch' 'lerna run --parallel prepack -- --watch'"
"watch": "concurrently 'yarn typecheck --watch' 'lerna run --parallel prepare -- --watch'"
},
"devDependencies": {
"@arkweid/lefthook": "^0.7.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-react-native-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"registry": "https://registry.npmjs.org/"
},
"scripts": {
"prepack": "babel --extensions .ts,.tsx src --out-dir lib --ignore '**/__tests__/**' --source-maps --delete-dir-on-start"
"prepare": "babel --extensions .ts,.tsx src --out-dir lib --ignore '**/__tests__/**' --source-maps --delete-dir-on-start"
},
"dependencies": {
"cross-spawn": "^7.0.3",
Expand Down
Loading

0 comments on commit 1fc011d

Please sign in to comment.