Skip to content

Commit 679f74a

Browse files
committed
Deploy script
1 parent 3549b5f commit 679f74a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ jspm_packages
3838

3939
lib
4040
demo/public
41+
.deploy

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"prepublish": "npm run build",
1212
"start:dev": "node_modules/.bin/babel-node ./demo/server.js",
1313
"start": "npm run start:dev",
14+
"deploy:demo": "COMMIT=$(git rev-parse --short HEAD) && BRANCH=gh-pages && GIT_URL=$(git remote get-url origin) && DIR=.deploy; rm -rf $DIR; (git clone $GIT_URL -b $BRANCH $DIR || (git init $DIR && cd $DIR && git remote add origin $GIT_URL && git checkout -b $BRANCH)) && rm -rf ${DIR}/* && cp -R ${DIR}/../demo/public/* $DIR && cd $DIR && git add -A && git commit -m \"Built artifacts of ${COMMIT}\" && git push origin $BRANCH",
1415
"test": "mocha --compilers js:babel-core/register --require testHelper.js **/__test__/*.js"
1516
},
1617
"repository": {

0 commit comments

Comments
 (0)