Skip to content

Commit

Permalink
Separate minification from docs publishing.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Oct 29, 2015
1 parent 205ebdf commit bd005d0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -25,6 +25,7 @@
"main": "install.js",
"scripts": {
"prepublish": "scripts/prepublish.sh",
"docs": "scripts/docs.sh",
"test": "mocha --reporter spec --full-trace test/run.js"
},
"devDependencies": {
Expand Down
16 changes: 16 additions & 0 deletions scripts/docs.sh
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

cd $(dirname $0)/..

docco install.js
git fetch origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
tar czvf docs.tgz docs
git checkout gh-pages
git rebase origin/gh-pages
tar xf docs.tgz --strip-components 1
mv install.html index.html
git commit -a -m "Regenerate docs."
git push origin gh-pages
git checkout ${BRANCH}
rm docs.tgz
13 changes: 0 additions & 13 deletions scripts/prepublish.sh
Expand Up @@ -3,16 +3,3 @@
cd $(dirname $0)/..

uglifyjs install.js -c -m > install.min.js

docco install.js
git fetch origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
tar czvf docs.tgz docs
git checkout gh-pages
git rebase origin/gh-pages
tar xf docs.tgz --strip-components 1
mv install.html index.html
git commit -a -m "Regenerate docs."
git push origin gh-pages
git checkout ${BRANCH}
rm docs.tgz

0 comments on commit bd005d0

Please sign in to comment.