ソースを参照

Build using bob

Janic Duplessis 5 年 前
コミット
3ddfc2a33c
共有2 個のファイルを変更した23 個の追加5 個の削除を含む
  1. 1
    1
      example/App.tsx
  2. 22
    4
      package.json

+ 1
- 1
example/App.tsx ファイルの表示

@@ -18,7 +18,7 @@ import {
18 18
 } from 'react-native/Libraries/NewAppScreen';
19 19
 
20 20
 // import { SafeAreaProvider, useSafeArea } from 'react-native-safe-area-context'; in your app.
21
-import { SafeAreaProvider, useSafeArea } from '..';
21
+import { SafeAreaProvider, useSafeArea } from '../src';
22 22
 
23 23
 type ForceInsets = 'always' | 'never';
24 24
 

+ 22
- 4
package.json ファイルの表示

@@ -2,14 +2,17 @@
2 2
   "name": "react-native-safe-area-context",
3 3
   "version": "0.3.1",
4 4
   "description": "A flexible way to handle safe area, also works on Android and web.",
5
-  "main": "src/index",
6
-  "module": "src/index",
5
+  "main": "lib/commonjs/index.js",
6
+  "module": "lib/module/index.js",
7
+  "react-native": "src/index.tsx",
8
+  "types": "lib/typescript/src/index.d.ts",
7 9
   "sideEffects": false,
8 10
   "files": [
11
+    "/src",
12
+    "/lib",
9 13
     "/android",
10 14
     "!/android/build",
11 15
     "/ios",
12
-    "/src",
13 16
     "/*.podspec"
14 17
   ],
15 18
   "author": "Janic Duplessis <janicduplessis@gmail.com>",
@@ -23,7 +26,8 @@
23 26
     "test": "yarn validate:prettier && yarn validate:eslint && yarn validate:typescript",
24 27
     "validate:eslint": "eslint \"src/**/*.{js,ts,tsx}\" \"example/**/*.{js,ts,tsx}\"",
25 28
     "validate:typescript": "tsc --project ./ --noEmit",
26
-    "validate:prettier": "prettier \"src/**/*.{js,ts,tsx}\" \"example/**/*.{js,ts,tsx}\" --check"
29
+    "validate:prettier": "prettier \"src/**/*.{js,ts,tsx}\" \"example/**/*.{js,ts,tsx}\" --check",
30
+    "prepare": "bob build"
27 31
   },
28 32
   "keywords": [
29 33
     "react-native",
@@ -58,5 +62,19 @@
58 62
   "repository": {
59 63
     "type": "git",
60 64
     "url": "https://github.com/th3rdwave/react-native-safe-area-context.git"
65
+  },
66
+  "jest": {
67
+    "modulePathIgnorePatterns": [
68
+      "<rootDir>/lib/"
69
+    ]
70
+  },
71
+  "@react-native-community/bob": {
72
+    "source": "src",
73
+    "output": "lib",
74
+    "targets": [
75
+      "commonjs",
76
+      "module",
77
+      "typescript"
78
+    ]
61 79
   }
62 80
 }