Skip to content

Commit 48204f1

Browse files
authored
Merge pull request #194 from jeongshin/fix/bob-build
fix: use builder bob to make outputs & fix package entry
2 parents 383fa30 + 8bfa37c commit 48204f1

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

package.json

+20-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "@baronha/react-native-multiple-image-picker",
33
"version": "2.0.3",
44
"description": "� react-native-multiple-image-picker enables applications to pick images and videos from multiple smart albums in iOS/Android �",
5-
"main": "lib/index",
6-
"module": "lib/index",
7-
"types": "lib/index.d.ts",
5+
"main": "./lib/commonjs/index.js",
6+
"module": "./lib/module/index.js",
7+
"types": "./lib/typescript/index.d.ts",
88
"react-native": "src/index",
99
"source": "src/index",
1010
"files": [
@@ -27,8 +27,7 @@
2727
"README.md"
2828
],
2929
"scripts": {
30-
"postinstall": "tsc || exit 0;",
31-
"typecheck": "tsc --noEmit",
30+
"typecheck": "tsc --project tsconfig.build.json --noEmit",
3231
"clean": "rm -rf android/build node_modules/**/android/build lib",
3332
"lint": "eslint \"**/*.{js,ts,tsx}\" --fix",
3433
"lint-ci": "eslint \"**/*.{js,ts,tsx}\" -f @jamesacarr/github-actions",
@@ -37,7 +36,8 @@
3736
"nitro": "yarn nitro-codegen",
3837
"example": "yarn --cwd MultipleImagePickerExample",
3938
"pod": "cd MultipleImagePickerExample && pod-install --quiet",
40-
"bootstrap": "yarn example && yarn && yarn pod"
39+
"bootstrap": "yarn example && yarn && yarn pod",
40+
"prepare": "bob build"
4141
},
4242
"keywords": [
4343
"react-native",
@@ -109,5 +109,19 @@
109109
"trailingComma": "es5",
110110
"useTabs": false,
111111
"semi": false
112+
},
113+
"react-native-builder-bob": {
114+
"source": "src",
115+
"output": "lib",
116+
"targets": [
117+
"commonjs",
118+
"module",
119+
[
120+
"typescript",
121+
{
122+
"project": "tsconfig.build.json"
123+
}
124+
]
125+
]
112126
}
113127
}

tsconfig.build.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
21
{
32
"extends": "./tsconfig",
4-
"exclude": ["example"]
3+
"exclude": ["example", "docs"]
54
}

0 commit comments

Comments
 (0)