Update ReadMe instructions with yarn requirement (#1933)

* Update ReadMe instructions to stress yarn requirements

* Change shell commands to reflect yarn usage
This commit is contained in:
Daniel Ternyak 2018-06-12 10:51:58 -05:00 committed by GitHub
parent 237c826141
commit 256a8fdf5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 24 deletions

View File

@ -7,48 +7,50 @@
## Requirements ## Requirements
* Node 8.9.4* * Node 8.9.4\*
* NPM >= 5 * Yarn >= 1.7.0\*\*
* Python 2.7.X** * Python 2.7.X\*\*\*
<sub>*Higher versions should work fun, but may cause inconsistencies. It's suggested you run 8.9.4 using `nvm`.</sub> <sub>\*Higher versions should work fun, but may cause inconsistencies. It's suggested you run 8.9.4 using `nvm`.</sub>
<br/> <br/>
<sub>**Python 3 is **not** supported, since our dependencies use `node-gyp`.</sub> <sub>**npm is NOT supported for package management. MyCrypto uses yarn.lock to ensure sub-dependency versions are pinned, so yarn is required to install node_modules</sub>
<br/>
<sub>\***Python 3 is **not** supported, since our dependencies use `node-gyp`.</sub>
## Running the App ## Running the App
After `npm install`ing all dependencies you can run various commands depending on what you want to do: After `yarn`ing all dependencies you can run various commands depending on what you want to do:
#### Development #### Development
```bash ```bash
# run app in dev mode in browser, rebuild on file changes # run app in dev mode in browser, rebuild on file changes
npm run dev yarn dev
``` ```
```bash ```bash
# run app in dev mode in electron, rebuild on file changes # run app in dev mode in electron, rebuild on file changes
npm run dev:electron yarn dev:electron
``` ```
#### Build Releases #### Build Releases
```bash ```bash
# builds the production server app # builds the production server app
npm run build yarn build
``` ```
```bash ```bash
# builds the downloadable version of the site # builds the downloadable version of the site
npm run build:downloadable yarn build:downloadable
``` ```
```bash ```bash
# builds the electron apps # builds the electron apps
npm run build:electron yarn build:electron
# builds only one OS's electron app # builds only one OS's electron app
npm run build:electron:(osx|linux|windows) yarn build:electron:(osx|linux|windows)
``` ```
All of these builds are output to a folder in `dist/`. All of these builds are output to a folder in `dist/`.
@ -57,26 +59,26 @@ All of these builds are output to a folder in `dist/`.
```bash ```bash
# run unit tests with Jest # run unit tests with Jest
npm run test yarn test
``` ```
#### Integration Tests: #### Integration Tests:
```bash ```bash
# run integration tests with Jest # run integration tests with Jest
npm run test:int yarn test:int
``` ```
#### Dev (HTTPS): #### Dev (HTTPS):
Some parts of the site, such as the Ledger wallet, require an HTTPS environment to work. To develop on HTTPS, do the following: Some parts of the site, such as the Ledger wallet, require an HTTPS environment to work. To develop on HTTPS, do the following:
1. Create your own SSL Certificate (Heroku has a [nice guide here](https://devcenter.heroku.com/articles/ssl-certificate-self)) 1. Create your own SSL Certificate (Heroku has a [nice guide here](https://devcenter.heroku.com/articles/ssl-certificate-self))
2. Move the `.key` and `.crt` files into `webpack_config/server.*` 2. Move the `.key` and `.crt` files into `webpack_config/server.*`
3. Run the following command: 3. Run the following command:
```bash ```bash
npm run dev:https yarn dev:https
``` ```
#### Address Derivation Checker: #### Address Derivation Checker:
@ -89,20 +91,20 @@ To test for correct address derivation, the address derivation checker uses mult
##### The derivation checker utility assumes that you have: ##### The derivation checker utility assumes that you have:
1. Docker installed/available 1. Docker installed/available
2. [dternyak/eth-priv-to-addr](https://hub.docker.com/r/dternyak/eth-priv-to-addr/) pulled from DockerHub 2. [dternyak/eth-priv-to-addr](https://hub.docker.com/r/dternyak/eth-priv-to-addr/) pulled from DockerHub
##### Docker setup instructions: ##### Docker setup instructions:
1. Install docker (on macOS, [Docker for Mac](https://docs.docker.com/docker-for-mac/) is suggested) 1. Install docker (on macOS, [Docker for Mac](https://docs.docker.com/docker-for-mac/) is suggested)
2. `docker pull dternyak/eth-priv-to-addr` 2. `docker pull dternyak/eth-priv-to-addr`
##### Run Derivation Checker ##### Run Derivation Checker
The derivation checker utility runs as part of the integration test suite. The derivation checker utility runs as part of the integration test suite.
```bash ```bash
npm run test:int yarn test:int
``` ```
## Folder structure: ## Folder structure:
@ -144,4 +146,3 @@ npm run test:int
</a> </a>
Cross browser testing and debugging provided by the very lovely team at BrowserStack. Cross browser testing and debugging provided by the very lovely team at BrowserStack.