Created
July 18, 2013 00:26
-
-
Save ryw/6025779 to your computer and use it in GitHub Desktop.
My hacky script to deploy to Modulus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# let's start fresh | |
rm -rf .demeteorized | |
rm /tmp/newfile | |
# run + cd | |
demeteorizer | |
cd .demeteorized | |
# phantomjs hack | |
echo "var path = require('path');" > /tmp/newfile | |
echo "var phantomjs = require('phantomjs');" >> /tmp/newfile | |
echo "process.env.PATH += ':' + path.dirname(phantomjs.path);" >> /tmp/newfile | |
echo "" >> /tmp/newfile | |
cat main.js >> /tmp/newfile | |
cp /tmp/newfile main.js | |
rm /tmp/newfile | |
sed -n 'H;${x;s/ "clean-css": "0.8.3",\n/ "phantomjs": "1.9.1-0",\ | |
&/;p;}' package.json >> /tmp/newfile | |
cp /tmp/newfile package.json | |
# npm 1.2.2 hack | |
rm /tmp/newfile | |
sed 's/"npm": "1.2.2"/"npm": "1.2.32"/' package.json >> /tmp/newfile | |
cp /tmp/newfile package.json | |
# deploy + go back to project dir | |
modulus deploy -p APPNAME | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would suggest using the latest version of
npm
: 1.3.4