diff --git a/demo.sh b/demo.sh new file mode 100644 index 00000000..9f3135f6 --- /dev/null +++ b/demo.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -o errexit # Exit on error + +git stash save +git checkout gh-pages +cd examples/todomvc +webpack +git add . +if git commit -m 'rebuild todomvc bundle for demo'; then # Commit the changes, if any + echo 'Changes Committed' +if git push --force; then # Commit the changes, if any + echo 'Pushed succecfully' +fi +fi +git checkout master +git stash apply \ No newline at end of file diff --git a/package.json b/package.json index edb55a9e..2f332770 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "test:watch": "NODE_ENV=test mocha --compilers js:babel/register --recursive --watch", "test:cov": "babel-node ./node_modules/.bin/isparta cover ./node_modules/.bin/_mocha -- --recursive", "prepublish": "npm run lint && npm run test && npm run clean && npm run build", - "demo":"git checkout gh-pages && cd examples/todomvc && webpack && cd ../../ && git add . && git commit -m \"rebuild todomvc bundle for demo\" && git push --force && git checkout master" + "demo":"bash ./demo.sh" }, "repository": { "type": "git",