浏览代码

removed yarn dependency, npm is fast enough

Daniel Zlotin 8 年前
父节点
当前提交
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
 install:
27
 install:
28
         # node:
28
         # node:
29
   - source ./scripts/env/installNode.sh
29
   - source ./scripts/env/installNode.sh
30
-        # yarn:
31
-  - source ./scripts/env/installYarn.sh
32
-  - yarn config set cache-folder $YARN_CACHE
33
         # android sdk:
30
         # android sdk:
34
   - source ./scripts/env/installAndroidSDK.sh
31
   - source ./scripts/env/installAndroidSDK.sh
35
         # fbsimctl:
32
         # fbsimctl:

+ 22
- 29
CONTRIBUTING.md 查看文件

15
 nvm use stable
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
 * Android SDK:
18
 * Android SDK:
26
 
19
 
27
 ```
20
 ```
52
 1. Install dependencies:
45
 1. Install dependencies:
53
 
46
 
54
     ```
47
     ```
55
-    yarn install
48
+    npm install
56
     ```
49
     ```
57
 
50
 
58
 1. Run the playground project in Android and iOS so that you can get a feel for the project.
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
 1. Run the tests. Before you start changing things, make sure everything works.
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
 ## Troubleshooting
65
 ## Troubleshooting
73
 
66
 
74
 * If the tests fail with an error like `Ineligible destinations for the "ReactNativeNavigation" scheme`, double check that you have the latest XCode installed.
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
 * 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.
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
 ```js
71
 ```js
79
 
72
 
82
 SyntaxError: Unexpected token (
75
 SyntaxError: Unexpected token (
83
 
76
 
84
 ```
77
 ```
85
-    
78
+
86
 You probably have an old node version which doesn't support async functions. Update your node using nvm according to the instructions above.
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
 ## Workflow
81
 ## Workflow
111
 
104
 
112
 | Command | Description |
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
 # Installing
1
 # Installing
2
 
2
 
3
 ### Add dependency
3
 ### Add dependency
4
-`yarn add react-native-navigation@alpha`
4
+`npm install --save react-native-navigation@alpha`
5
 
5
 
6
 ### Configure Xcode
6
 ### Configure Xcode
7
 drag-drop `node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.xcodeproj` into Libraries folder in xcode (along the rest of react)
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
 ### Installation
115
 ### Installation
116
 1. Download react-native-navigation v2
116
 1. Download react-native-navigation v2
117
 ```bash
117
 ```bash
118
-yarn add react-native-navigation@alpha
118
+npm install --save react-native-navigation@alpha
119
 ```
119
 ```
120
 ##### iOS
120
 ##### iOS
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))
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
-#!/bin/bash -e
2
-
3
-brew install yarn

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

2
 const exec = require('shell-utils').exec;
2
 const exec = require('shell-utils').exec;
3
 
3
 
4
 async function run() {
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
   console.log('ALL PASSED!!!');
11
   console.log('ALL PASSED!!!');
12
 }
12
 }
13
 
13
 

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

10
 
10
 
11
 const release = _.includes(process.argv, 'release');
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
 const filter = _(process.argv).dropWhile((a) => a !== 'just').take(2).last();
14
 const filter = _(process.argv).dropWhile((a) => a !== 'just').take(2).last();
15
 
15
 
16
 run();
16
 run();
24
 }
24
 }
25
 
25
 
26
 function runTests() {
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
   const filterParam = filter ? '-Pandroid.testInstrumentationRunnerArguments.class=' + filter : '';
29
   const filterParam = filter ? '-Pandroid.testInstrumentationRunnerArguments.class=' + filter : '';
30
   exec.execSync(`cd AndroidE2E && ./gradlew ${filterParam} connectedDebugAndroidTest`);
30
   exec.execSync(`cd AndroidE2E && ./gradlew ${filterParam} connectedDebugAndroidTest`);
31
 }
31
 }

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

19
   echo -e "${green}\t\t\t --> $(($duration / 60)) minutes and $(($duration % 60)) seconds ${nocolor}\n"
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
 ### Installation
73
 ### Installation
74
 1. Download react-native-navigation v2
74
 1. Download react-native-navigation v2
75
 ```bash
75
 ```bash
76
-yarn add react-native-navigation@alpha
76
+npm install --save react-native-navigation@alpha
77
 ```
77
 ```
78
 ##### iOS
78
 ##### iOS
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))
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
文件差异内容过多而无法显示
查看文件