Skip to content

Commit

Permalink
Adding deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
rizowski committed Apr 12, 2017
1 parent eefee51 commit f060f59
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"ci-win": "npm run lint && npm test",
"coverage": "istanbul cover _mocha -- --recursive tests --timeout 10000 --retries 3 -r tests/globals --compilers js:babel-core/register",
"build": "babel src -d build -s inline",
"prepublish": "npm run build"
"prepublish": "npm run build",
"deploy": "./scripts/deploy.sh"
},
"engines": {
"node": ">=4"
Expand Down
13 changes: 13 additions & 0 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
function confirmOwner {
person="$(npm whoami)"
if [ "$person" != "rizowski" ]; then
echo "Not Rizowski";
exit 1;
fi
}

confirmOwner
npm run clean
npm i

npm publish

0 comments on commit f060f59

Please sign in to comment.