From 742b17f178ac1c90cd1c17f0bb6c0864a65f55fe Mon Sep 17 00:00:00 2001 From: Gokula Krishna Date: Fri, 4 Jan 2019 11:47:00 +0100 Subject: [PATCH 1/5] Move all scripts to npm --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 8e08afac63..b008c10a33 100644 --- a/package.json +++ b/package.json @@ -58,11 +58,11 @@ "scripts": { "start": "gulp watch", "test": "eslint src/ && jest -w 10 --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", - "gen-branch": "gb() { b=$1; test -z $b && exit 0; (git branch | grep $b) || exit 1; git stash; git checkout $b; yarn install --force --frozen-lockfile; gulp build-min; rm -rf branch/$b; mkdir -p branch/$b ; cp -r www/ branch/$b;}; gb", - "deploy": "d() { yarn gen-branch $1 || exit 1; git checkout master ; yarn install --force --frozen-lockfile; gulp deploy;}; d", - "deploy-all": "yarn gen-branch beta; yarn gen-branch translation; yarn deploy", + "gen-branch": "gb() { b=$1; test -z $b && exit 0; (git branch | grep $b) || exit 1; git stash; git checkout $b; npm run install; gulp build-min; rm -rf branch/$b; mkdir -p branch/$b ; cp -r www/ branch/$b;}; gb", + "deploy": "d() { npm run gen-branch $1 || exit 1; git checkout master ; npm run install; gulp deploy;}; d", + "deploy-all": "npm run gen-branch beta; npm run gen-branch translation; npm run deploy", "build": "webpack --config webpack.config.cli.js", - "prepublishOnly": "yarn build", + "prepublishOnly": "npm run build", "precommit": "lint-staged" }, "author": "Binary.com", From b721cb6184f3adce612fda2a367e75b41a1b5002 Mon Sep 17 00:00:00 2001 From: Gokula Krishna Date: Fri, 4 Jan 2019 11:48:32 +0100 Subject: [PATCH 2/5] Fix syntax error in scripts --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b008c10a33..7f0f2c66f9 100644 --- a/package.json +++ b/package.json @@ -58,8 +58,8 @@ "scripts": { "start": "gulp watch", "test": "eslint src/ && jest -w 10 --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", - "gen-branch": "gb() { b=$1; test -z $b && exit 0; (git branch | grep $b) || exit 1; git stash; git checkout $b; npm run install; gulp build-min; rm -rf branch/$b; mkdir -p branch/$b ; cp -r www/ branch/$b;}; gb", - "deploy": "d() { npm run gen-branch $1 || exit 1; git checkout master ; npm run install; gulp deploy;}; d", + "gen-branch": "gb() { b=$1; test -z $b && exit 0; (git branch | grep $b) || exit 1; git stash; git checkout $b; npm install; gulp build-min; rm -rf branch/$b; mkdir -p branch/$b ; cp -r www/ branch/$b;}; gb", + "deploy": "d() { npm run gen-branch $1 || exit 1; git checkout master ; npm install; gulp deploy;}; d", "deploy-all": "npm run gen-branch beta; npm run gen-branch translation; npm run deploy", "build": "webpack --config webpack.config.cli.js", "prepublishOnly": "npm run build", From ecbb54aef5e762225f3dbfb83ac4ec7dd6d5d179 Mon Sep 17 00:00:00 2001 From: Gokula Krishna Date: Fri, 4 Jan 2019 12:06:39 +0100 Subject: [PATCH 3/5] Deploy script update. Clear node modules and package-lock.json before install --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7f0f2c66f9..83c6ea8fd9 100644 --- a/package.json +++ b/package.json @@ -58,8 +58,8 @@ "scripts": { "start": "gulp watch", "test": "eslint src/ && jest -w 10 --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", - "gen-branch": "gb() { b=$1; test -z $b && exit 0; (git branch | grep $b) || exit 1; git stash; git checkout $b; npm install; gulp build-min; rm -rf branch/$b; mkdir -p branch/$b ; cp -r www/ branch/$b;}; gb", - "deploy": "d() { npm run gen-branch $1 || exit 1; git checkout master ; npm install; gulp deploy;}; d", + "gen-branch": "gb() { b=$1; test -z $b && exit 0; (git branch | grep $b) || exit 1; git stash; git checkout $b; rm -rf node_modules/; rm package-lock.json;npm install; gulp build-min; rm -rf branch/$b; mkdir -p branch/$b ; cp -r www/ branch/$b;}; gb", + "deploy": "d() { npm run gen-branch $1 || exit 1; git checkout master;rm -rf node_modules/;rm package-lock.json; npm install; gulp deploy;}; d", "deploy-all": "npm run gen-branch beta; npm run gen-branch translation; npm run deploy", "build": "webpack --config webpack.config.cli.js", "prepublishOnly": "npm run build", From 8aec535ee1bd8339935f3ea1f1b25ee5120d80fa Mon Sep 17 00:00:00 2001 From: Gokula Krishna Date: Fri, 4 Jan 2019 12:07:46 +0100 Subject: [PATCH 4/5] Ignore package-lock.json --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index bc89485cf5..02c531fc38 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .publish static/css/*.css* node_modules/ +package-lock.json npm-debug.log rev-manifest.json coverage From 93ef02ccfe5b6ab677c180e5c7080546cb2746d2 Mon Sep 17 00:00:00 2001 From: Gokula Krishna Date: Fri, 4 Jan 2019 12:18:54 +0100 Subject: [PATCH 5/5] Documentation update --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 06cb79191b..4325f1412e 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ Visit [wiki](https://github.com/binary-com/binary-bot/wiki) for more info. git clone https://github.com/binary-com/binary-bot.git cd binary-bot git checkout dev -yarn install -yarn start +npm install +npm run start ``` **Note:** Please branch your work from dev, and make sure your local dev is up-to-date with upstream @@ -22,21 +22,21 @@ yarn start ### Deploying to local gh-pages ``` -yarn deploy [branchname] # can contain / +npm run deploy [branchname] # can contain / ``` ## Deployment/Release ``` gulp test-deploy # for local test deploy -yarn deploy # to deploy a branch (eg., beta) and master -yarn deploy-all # to deploy master, translations and beta +npm run deploy # to deploy a branch (eg., beta) and master +npm run deploy-all # to deploy master, translations and beta ``` ## Publishing a new version ``` -yarn version --new-version patch +npm run version --new-version patch npm publish ``` @@ -44,7 +44,7 @@ npm publish ``` git pull --rebase upstream dev -yarn install +npm install ``` ## Running the CLI command