瀏覽代碼

removed yarn dependency, npm is fast enough

Daniel Zlotin 6 年之前
父節點
當前提交
0cacb93a0e
共有 11 個檔案被更改,包括 8273 行新增5378 行删除
  1. 0
    3
      .travis.yml
  2. 22
    29
      CONTRIBUTING.md
  3. 1
    1
      INSTALLING.md
  4. 1
    1
      README.md
  5. 8231
    0
      package-lock.json
  6. 0
    3
      scripts/env/installYarn.sh
  7. 6
    6
      scripts/test.all.js
  8. 3
    3
      scripts/test.e2e.android.js
  9. 8
    8
      scripts/travis.sh
  10. 1
    1
      v1tov2diff.md
  11. 0
    5323
      yarn.lock

+ 0
- 3
.travis.yml 查看文件

@@ -27,9 +27,6 @@ cache:
27 27
 install:
28 28
         # node:
29 29
   - source ./scripts/env/installNode.sh
30
-        # yarn:
31
-  - source ./scripts/env/installYarn.sh
32
-  - yarn config set cache-folder $YARN_CACHE
33 30
         # android sdk:
34 31
   - source ./scripts/env/installAndroidSDK.sh
35 32
         # fbsimctl:

+ 22
- 29
CONTRIBUTING.md 查看文件

@@ -15,13 +15,6 @@ nvm install stable
15 15
 nvm use stable
16 16
 ```
17 17
 
18
-* Latest stable Yarn:
19
-
20
-```
21
-curl -o- -L https://yarnpkg.com/install.sh | bash
22
-export PATH=$PATH:$HOME/.yarn/bin
23
-```
24
-
25 18
 * Android SDK:
26 19
 
27 20
 ```
@@ -52,28 +45,28 @@ Then:
52 45
 1. Install dependencies:
53 46
 
54 47
     ```
55
-    yarn install
48
+    npm install
56 49
     ```
57 50
 
58 51
 1. Run the playground project in Android and iOS so that you can get a feel for the project.
59
-  
60
-    1. `yarn start` to get the package running in a terminal, leave it open
61 52
 
62
-    1. iOS: `yarn xcode` & run the project from XCode
63
-    
64
-    1. Android: Open the app in Android Studio and click `Run`   
53
+    1. `npm run start` to get the package running in a terminal, leave it open
54
+
55
+    1. iOS: `npm run xcode` & run the project from XCode
56
+
57
+    1. Android: Open the app in Android Studio and click `Run`
65 58
 
66 59
 1. Run the tests. Before you start changing things, make sure everything works.
67 60
 
68 61
      ```
69
-     yarn test-all
62
+     npm run test-all
70 63
      ```
71 64
 
72 65
 ## Troubleshooting
73 66
 
74 67
 * If the tests fail with an error like `Ineligible destinations for the "ReactNativeNavigation" scheme`, double check that you have the latest XCode installed.
75 68
 * If the tests fail because an Android emulator isn't available (something like `com.android.builder.testing.api.DeviceException: No connected devices!`), start the Android project from Android Studio and leave the emulator running, then try again.
76
-* If the tests fail with an error such as: 
69
+* If the tests fail with an error such as:
77 70
 
78 71
 ```js
79 72
 
@@ -82,7 +75,7 @@ Then:
82 75
 SyntaxError: Unexpected token (
83 76
 
84 77
 ```
85
-    
78
+
86 79
 You probably have an old node version which doesn't support async functions. Update your node using nvm according to the instructions above.
87 80
 
88 81
 ## Workflow
@@ -111,17 +104,17 @@ No PR will be accepted without adequate test coverage.
111 104
 
112 105
 | Command | Description |
113 106
 | ------- | ----------- |
114
-| `yarn install` | installs dependencies |
115
-| `yarn clean` | cleans all build directories, stops packager, fixes flakiness by removing watchman cache, etc. |
116
-| `yarn start` | starts the react-native packager for local debugging |
117
-| `yarn xcode` | for convenience, opens xcode in this project |
118
-| `yarn install-android`  |  builds playground debug/release version and installs on running android devices/emulators. <br> **Options:** `-- release` |
119
-| `yarn uninstall-android` | uninstalls playground from running android devices/simulators |
120
-| `yarn test-js` | runs javascript tests and coverage report |
121
-| `yarn test-watch` | runs javascript tests in watch mode (can also use the provided wallaby config) |
122
-| `yarn test-unit-ios` | runs ios unit tests in debug/release <br> **Options:** `-- release` |
123
-| `yarn test-unit-android` | runs android unit tests in debug/release <br> **Options:** `-- release` |
124
-| `yarn test-e2e-ios` | runs the ios e2e suite (with detox) in debug/release |
125
-| `yarn test-e2e-android` | runs the android e2e suite (with uiautomator) in debug/release on running devices/emulators <br> **Options:** `-- [release] [just com.TestClass#testMethod]` |
126
-| `yarn test-all` | runs all tests in parallel |
107
+| `npm install` | installs dependencies |
108
+| `npm run clean` | cleans all build directories, stops packager, fixes flakiness by removing watchman cache, etc. |
109
+| `npm run start` | starts the react-native packager for local debugging |
110
+| `npm run xcode` | for convenience, opens xcode in this project |
111
+| `npm run install-android`  |  builds playground debug/release version and installs on running android devices/emulators. <br> **Options:** `-- release` |
112
+| `npm run uninstall-android` | uninstalls playground from running android devices/simulators |
113
+| `npm run test-js` | runs javascript tests and coverage report |
114
+| `npm run test-watch` | runs javascript tests in watch mode (can also use the provided wallaby config) |
115
+| `npm run test-unit-ios` | runs ios unit tests in debug/release <br> **Options:** `-- release` |
116
+| `npm run test-unit-android` | runs android unit tests in debug/release <br> **Options:** `-- release` |
117
+| `npm run test-e2e-ios` | runs the ios e2e suite (with detox) in debug/release |
118
+| `npm run test-e2e-android` | runs the android e2e suite (with uiautomator) in debug/release on running devices/emulators <br> **Options:** `-- [release] [just com.TestClass#testMethod]` |
119
+| `npm run test-all` | runs all tests in parallel |
127 120
 

+ 1
- 1
INSTALLING.md 查看文件

@@ -1,7 +1,7 @@
1 1
 # Installing
2 2
 
3 3
 ### Add dependency
4
-`yarn add react-native-navigation@alpha`
4
+`npm install --save react-native-navigation@alpha`
5 5
 
6 6
 ### Configure Xcode
7 7
 drag-drop `node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.xcodeproj` into Libraries folder in xcode (along the rest of react)

+ 1
- 1
README.md 查看文件

@@ -115,7 +115,7 @@ If v2 supports everything you need for your app we encourage you to use it.
115 115
 ### Installation
116 116
 1. Download react-native-navigation v2
117 117
 ```bash
118
-yarn add react-native-navigation@alpha
118
+npm install --save react-native-navigation@alpha
119 119
 ```
120 120
 ##### iOS
121 121
 2. In Xcode, in Project Navigator (left pane), right-click on the `Libraries` > `Add files to [project name]`. Add `./node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.xcodeproj` ([screenshots](https://facebook.github.io/react-native/docs/linking-libraries-ios.html#step-1))

+ 8231
- 0
package-lock.json
文件差異過大導致無法顯示
查看文件


+ 0
- 3
scripts/env/installYarn.sh 查看文件

@@ -1,3 +0,0 @@
1
-#!/bin/bash -e
2
-
3
-brew install yarn

+ 6
- 6
scripts/test.all.js 查看文件

@@ -2,12 +2,12 @@
2 2
 const exec = require('shell-utils').exec;
3 3
 
4 4
 async function run() {
5
-  exec.execSync(`yarn run clean`);
6
-  exec.execSync(`yarn run test-js`);
7
-  exec.execAsyncSilent(`yarn run start`);
8
-  await exec.execAsyncAll(`yarn run test-unit-android`, `yarn run test-unit-ios`);
9
-  await exec.execAsyncAll(`yarn run test-e2e-android`, `yarn run test-e2e-ios`);
10
-  exec.execSync(`yarn run clean`);
5
+  exec.execSync(`npm run clean`);
6
+  exec.execSync(`npm run test-js`);
7
+  exec.execAsyncSilent(`npm run start`);
8
+  await exec.execAsyncAll(`npm run test-unit-android`, `npm run test-unit-ios`);
9
+  await exec.execAsyncAll(`npm run test-e2e-android`, `npm run test-e2e-ios`);
10
+  exec.execSync(`npm run clean`);
11 11
   console.log('ALL PASSED!!!');
12 12
 }
13 13
 

+ 3
- 3
scripts/test.e2e.android.js 查看文件

@@ -10,7 +10,7 @@ const exec = require('shell-utils').exec;
10 10
 
11 11
 const release = _.includes(process.argv, 'release');
12 12
 
13
-// Run just a single test, e.g. yarn test-e2e-android -- just com.MyClass#myMethod
13
+// Run just a single test, e.g. npm test-e2e-android -- just com.MyClass#myMethod
14 14
 const filter = _(process.argv).dropWhile((a) => a !== 'just').take(2).last();
15 15
 
16 16
 run();
@@ -24,8 +24,8 @@ function run() {
24 24
 }
25 25
 
26 26
 function runTests() {
27
-  exec.execSync(`yarn run uninstall-android`);
28
-  exec.execSync(`yarn run install-android ${release ? '-- release' : ''}`);
27
+  exec.execSync(`npm run uninstall-android`);
28
+  exec.execSync(`npm run install-android ${release ? '-- release' : ''}`);
29 29
   const filterParam = filter ? '-Pandroid.testInstrumentationRunnerArguments.class=' + filter : '';
30 30
   exec.execSync(`cd AndroidE2E && ./gradlew ${filterParam} connectedDebugAndroidTest`);
31 31
 }

+ 8
- 8
scripts/travis.sh 查看文件

@@ -19,11 +19,11 @@ run_f () {
19 19
   echo -e "${green}\t\t\t --> $(($duration / 60)) minutes and $(($duration % 60)) seconds ${nocolor}\n"
20 20
 }
21 21
 
22
-run_f "yarn install"
23
-run_f "yarn run clean"
24
-run_f "yarn run test-js"
25
-run_f "yarn run test-unit-android -- release"
26
-run_f "yarn run test-unit-ios -- release"
27
-run_f "yarn run test-e2e-android -- release"
28
-run_f "yarn run test-e2e-ios -- release"
29
-run_f "yarn run release"
22
+run_f "npm install"
23
+run_f "npm run clean"
24
+run_f "npm run test-js"
25
+run_f "npm run test-unit-android -- release"
26
+run_f "npm run test-unit-ios -- release"
27
+run_f "npm run test-e2e-android -- release"
28
+run_f "npm run test-e2e-ios -- release"
29
+run_f "npm run release"

+ 1
- 1
v1tov2diff.md 查看文件

@@ -73,7 +73,7 @@ If v2 supports everything you need for your app we encourage you to use it.
73 73
 ### Installation
74 74
 1. Download react-native-navigation v2
75 75
 ```bash
76
-yarn add react-native-navigation@alpha
76
+npm install --save react-native-navigation@alpha
77 77
 ```
78 78
 ##### iOS
79 79
 2. In Xcode, in Project Navigator (left pane), right-click on the `Libraries` > `Add files to [project name]`. Add `./node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.xcodeproj` ([screenshots](https://facebook.github.io/react-native/docs/linking-libraries-ios.html#step-1))

+ 0
- 5323
yarn.lock
文件差異過大導致無法顯示
查看文件