Skip to content

Commit 4909bb9

Browse files
committed
build: update to use builder-bob to generate lib files
1 parent f1646c1 commit 4909bb9

File tree

4 files changed

+1672
-1318
lines changed

4 files changed

+1672
-1318
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ node_modules
33
.idea
44
dist
55
.env
6-
.npmrc
6+
.npmrc
7+
# generated by bob
8+
lib/

babel.config.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

package.json

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
"name": "react-native-youtube-iframe",
33
"version": "2.3.0",
44
"description": "A simple wrapper around the youtube iframe js API for react native",
5-
"main": "dist/index.js",
5+
"main": "./lib/commonjs/index.js",
66
"types": "index.d.ts",
77
"scripts": {
88
"lint": "eslint src",
9-
"test": "echo \"Error: no test specified\" && exit 1",
10-
"build": "rimraf ./dist && babel src --out-dir dist",
11-
"prepare": "rimraf ./dist && babel src --out-dir dist"
9+
"prepare": "bob build"
1210
},
1311
"repository": {
1412
"type": "git",
@@ -49,14 +47,34 @@
4947
}
5048
},
5149
"devDependencies": {
52-
"@babel/cli": "^7.2.3",
53-
"@babel/core": "^7.2.2",
54-
"@react-native-community/eslint-config": "^2.0.0",
5550
"eslint": "^7.7.0",
5651
"metro-react-native-babel-preset": "^0.64.0",
57-
"rimraf": "^3.0.2"
52+
"react-native-builder-bob": "^0.40.12"
5853
},
5954
"dependencies": {
60-
"events": "^3.2.0"
61-
}
55+
"events": "^3.3.0"
56+
},
57+
"files": [
58+
"src",
59+
"lib",
60+
"!**/__tests__",
61+
"!**/__fixtures__",
62+
"!**/__mocks__"
63+
],
64+
"react-native-builder-bob": {
65+
"source": "src",
66+
"output": "lib",
67+
"targets": [
68+
[
69+
"commonjs",
70+
{
71+
"esm": false
72+
}
73+
]
74+
]
75+
},
76+
"eslintIgnore": [
77+
"node_modules/",
78+
"lib/"
79+
]
6280
}

0 commit comments

Comments
 (0)