浏览代码

Improve example npm scripts

Mathieu Acthernoene 5 年前
父节点
当前提交
6cc9755d64
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6
    3
      example/package.json

+ 6
- 3
example/package.json 查看文件

@@ -1,11 +1,14 @@
1 1
 {
2
-  "name": "RNPermissionsExample",
2
+  "name": "react-native-permissions-example",
3 3
   "version": "0.0.1",
4 4
   "private": true,
5 5
   "scripts": {
6
+    "clean-modules": "rm -rf ./node_modules/react-native-permissions/{example,node_modules}",
7
+    "clean": "rm -rf ./node_modules ./ios/Pods",
8
+    "postinstall": "yarn clean-modules && yarn pod-install",
9
+    "pod-install": "cd ./ios && pod install && cd ..",
6 10
     "start": "react-native start",
7
-    "postinstall": "rm -rf node_modules/react-native-permissions/{example,node_modules}",
8
-    "reinstall": "rm -rf node_modules ios/Pods && yarn install && cd ios && pod install"
11
+    "reinstall": "yarn clean && yarn install"
9 12
   },
10 13
   "dependencies": {
11 14
     "react": "16.8.6",