demo/setup: Simplify by not requiring to globally install some dependencies. (#11)

This commit is contained in:
Justin D. Harris 2019-06-18 15:36:28 -04:00 коммит произвёл GitHub
Родитель d0fe179cc3
Коммит 8ce607af0a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 1866 добавлений и 1531 удалений

Просмотреть файл

@ -23,7 +23,7 @@ You can use Docker by running:
```bash ```bash
docker build -t decai . docker build -t decai .
docker run --rm -it -p 7545:7545 -v ${PWD}:/root/workspace/demo --name decai decai bash docker run --rm -it -p 7545:7545 -v ${PWD}:/root/workspace/demo --name decai decai bash
# You may have to run `./setup.sh` in the container to ensure that everything is set up properly. # You may have to run `rm -rf node_modules client/node_modules && ./setup.sh` in the container to ensure that everything is set up properly.
``` ```
## Troubleshooting Setup ## Troubleshooting Setup

Просмотреть файл

@ -1,5 +1,5 @@
{ {
"name": "decai-demo", "name": "decai-demo-client",
"version": "1.0.0", "version": "1.0.0",
"license": "MIT", "license": "MIT",
"private": true, "private": true,
@ -18,6 +18,7 @@
"react-dom": "^16.8.6", "react-dom": "^16.8.6",
"react-router-dom": "^5.0.0", "react-router-dom": "^5.0.0",
"react-scripts": "^2.1.8", "react-scripts": "^2.1.8",
"truffle": "^5.0.22",
"web3": "^1.0.0-beta.52" "web3": "^1.0.0-beta.52"
}, },
"scripts": { "scripts": {

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,7 +1,8 @@
{ {
"name": "example-create-react-app-express", "name": "decai-demo",
"version": "1.0.0", "version": "1.0.0",
"license": "MIT", "license": "MIT",
"private": true,
"scripts": { "scripts": {
"blockchain": "mkdir --parents blockchain_db && ganache-cli --db blockchain_db --networkId 5782 --gasLimit 8000000 --gasPrice 1 --host 0.0.0.0 --port 7545 --mnemonic \"net pistol fun vibrant sausage vintage general silk weekend street brave rubber\"", "blockchain": "mkdir --parents blockchain_db && ganache-cli --db blockchain_db --networkId 5782 --gasLimit 8000000 --gasPrice 1 --host 0.0.0.0 --port 7545 --mnemonic \"net pistol fun vibrant sausage vintage general silk weekend street brave rubber\"",
"clean": "rm -rf blockchain_db db.sqlite client/src/contracts/*.json", "clean": "rm -rf blockchain_db db.sqlite client/src/contracts/*.json",
@ -12,7 +13,9 @@
}, },
"dependencies": { "dependencies": {
"body-parser": "^1.18.3", "body-parser": "^1.18.3",
"ethlint": "^1.2.4",
"express": "^4.16.4", "express": "^4.16.4",
"ganache-cli": "^6.4.4",
"nodemon": "^1.18.11", "nodemon": "^1.18.11",
"sql.js": "0.5.0" "sql.js": "0.5.0"
}, },

Просмотреть файл

@ -4,9 +4,9 @@ set -ex
if [ "${CI}" == "true" ]; then if [ "${CI}" == "true" ]; then
# Don't do globally in Azure pipeline because of permissions issues. # Don't do globally in Azure pipeline because of permissions issues.
npm install ethlint ganache-cli truffle yarn npm install yarn
else else
npm install -g ethlint ganache-cli truffle yarn npm install -g yarn
fi fi
yarn install yarn install

Разница между файлами не показана из-за своего большого размера Загрузить разницу