Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 5e3d0a6

Browse files
committed
setup react-native-bob
1 parent 44e73f8 commit 5e3d0a6

File tree

5 files changed

+982
-47
lines changed

5 files changed

+982
-47
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/

__tests__/index.unit.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
useResponsiveScreenHeight,
1313
useResponsiveScreenWidth,
1414
useResponsiveScreenFontSize
15-
} from "../lib/index";
15+
} from "../src/index";
1616
import { render, cleanup } from "@testing-library/react-native";
1717

1818
afterEach(cleanup);

jest.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ module.exports = {
44
verbose: true,
55
transformIgnorePatterns: [
66
"node_modules/(?!(jest-)?react-native|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base)"
7-
]
7+
],
8+
modulePathIgnorePatterns: ["lib/"]
89
};

package.json

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,21 @@
22
"name": "react-native-responsive-dimensions",
33
"version": "3.1.0-beta-2",
44
"description": "Resposive fontSize, height and width for your react-native components.",
5-
"main": "lib/index.js",
5+
"main": "lib/commonjs/index.js",
6+
"module": "lib/module/index.js",
7+
"react-native": "src/index.ts",
8+
"types": "lib/typescript/src/index.d.ts",
9+
"files": [
10+
"lib/",
11+
"src/"
12+
],
613
"scripts": {
714
"build": "tsc -p .",
815
"start": "tsc -w",
916
"test": "jest",
10-
"coverage": "jest --coverage"
17+
"coverage": "jest --coverage",
18+
"prepare": "bob build"
1119
},
12-
"files": [
13-
"lib"
14-
],
1520
"keywords": [
1621
"react-native",
1722
"responsive",
@@ -27,7 +32,22 @@
2732
"peerDependencies": {
2833
"react-native": ">=0.44.1"
2934
},
35+
"@react-native-community/bob": {
36+
"source": "src",
37+
"output": "lib",
38+
"targets": [
39+
[
40+
"commonjs",
41+
{
42+
"copyFlow": true
43+
}
44+
],
45+
"module",
46+
"typescript"
47+
]
48+
},
3049
"devDependencies": {
50+
"@react-native-community/bob": "^0.10.0",
3151
"@react-native-community/eslint-config": "^0.0.7",
3252
"@testing-library/react-native": "^5.0.3",
3353
"@types/jest": "^25.1.4",

0 commit comments

Comments
 (0)