Chore: migrate project to yarn v1
This commit is contained in:
committed by
Sofiya Tepikin
parent
38f4836632
commit
2896a767ab
+4
-1
@@ -37,7 +37,6 @@ local.properties
|
||||
#
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
# BUCK
|
||||
buck-out/
|
||||
@@ -77,3 +76,7 @@ android/app/src/main/assets/*
|
||||
nodejs-assets/nodejs-project/sample-*
|
||||
nodejs-assets/build-native-modules-MacOS-helper-script-node.sh
|
||||
nodejs-assets/build-native-modules-MacOS-helper-script-npm.sh
|
||||
|
||||
# yarn
|
||||
.yarn/*
|
||||
yarn-error.log
|
||||
|
||||
@@ -31,16 +31,16 @@ or clone it with HTTPS
|
||||
|
||||
git clone https://gitlab.com/bloodyhealth/drip.git
|
||||
|
||||
### 2. Node & npm version
|
||||
### 2. Node & yarn version
|
||||
|
||||
Make sure you are running Node 14 and npm 6.14.17. It's easiest to switch Node versions using `nvm`, here's how to install NVM: https://github.com/nvm-sh/nvm#installing-and-updating. Once you have nvm you can install node 14:
|
||||
Make sure you are running Node 14 and classic yarn (v.1). It's easiest to switch Node versions using `nvm`, here's how to install NVM: https://github.com/nvm-sh/nvm#installing-and-updating. Once you have nvm you can install node 14:
|
||||
|
||||
nvm install v14.19.3
|
||||
|
||||
and then run
|
||||
|
||||
cd drip
|
||||
npm install
|
||||
yarn install
|
||||
|
||||
## for Android
|
||||
|
||||
@@ -58,11 +58,11 @@ Either start a [virtual device in Android Studio](https://developer.android.com/
|
||||
|
||||
i. Open a terminal and run
|
||||
|
||||
npm run android
|
||||
yarn run android
|
||||
|
||||
ii. To see logging output, run the following command in another tab:
|
||||
|
||||
npm run log
|
||||
yarn run log
|
||||
|
||||
iii. Run the following command and select enable hot reloading (see https://facebook.github.io/react-native/docs/debugging.html):
|
||||
|
||||
@@ -91,11 +91,11 @@ i. Install XCode dependencies by running the following command from the root pro
|
||||
|
||||
ii. To run app either open drip workspace ('drip.xcworkspace' file) with XCode and run "Build" or run the following command:
|
||||
|
||||
npm run ios
|
||||
yarn run ios
|
||||
|
||||
iii. If you are building the app with XCode make sure you are running this as well:
|
||||
|
||||
npm start
|
||||
yarn start
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
@@ -110,7 +110,7 @@ Now, `which java` should output `/Applications/Android Studio.app/Contents/jre/j
|
||||
|
||||
#### [MacOS] Ninja
|
||||
|
||||
If `npm` says `CMake was unable to find a build program corresponding to "Ninja".`:
|
||||
If `yarn` says `CMake was unable to find a build program corresponding to "Ninja".`:
|
||||
|
||||
brew install ninja
|
||||
|
||||
@@ -124,7 +124,7 @@ If you get error messages about `adb` not being found on your path:
|
||||
|
||||
If you would like to clear project cache and/or re-install project libraries, you can run clear script as follows:
|
||||
|
||||
npm run clear
|
||||
yarn run clear
|
||||
|
||||
Script accepts the following options:
|
||||
"all" - script will delete all caches and re-install project libraries,
|
||||
@@ -135,7 +135,7 @@ Script accepts the following options:
|
||||
|
||||
For example, if you would like to clear android part of the project and re-install project libraries, you can run the following command:
|
||||
|
||||
npm run clear android npm
|
||||
yarn run clear android npm
|
||||
|
||||
## Tests
|
||||
|
||||
@@ -143,7 +143,7 @@ For example, if you would like to clear android part of the project and re-insta
|
||||
|
||||
You can run the tests with:
|
||||
|
||||
npm test
|
||||
yarn test
|
||||
|
||||
### End to end tests
|
||||
|
||||
@@ -164,7 +164,7 @@ You can run the tests with:
|
||||
5. For the first time you need to get the app on the phone or if you run into this error:
|
||||
`'app-debug-androidTest.apk' could not be found`
|
||||
--> open a new 2nd tab and run (in your drip folder): `cd android and ./gradlew assembleAndroidTest`
|
||||
Otherwise just open a new 2nd tab to run (in your drip folder) `npm run android`
|
||||
Otherwise just open a new 2nd tab to run (in your drip folder) `yarn run android`
|
||||
6. Open a new 3rd tab to run `./node_modules/.bin/detox test -c android.emu.debug`
|
||||
|
||||
Hopefully you see the magic happening clicking through the app and happy test results on your console :sun_with_face: !
|
||||
@@ -175,7 +175,7 @@ To ensure that core app functionality is working, we developed a [test protocol]
|
||||
|
||||
## Debugging
|
||||
|
||||
In order to see logging output from the app, run `npm run log` in a separate terminal. You can output specific code you want to see, with:
|
||||
In order to see logging output from the app, run `yarn run log` in a separate terminal. You can output specific code you want to see, with:
|
||||
`console.log(theVariableIWantToSeeHere)`
|
||||
or just a random string to check if this piece of code is actually running:
|
||||
`console.log("HELLO")`.
|
||||
|
||||
Reference in New Issue
Block a user