Skip to content

Instantly share code, notes, and snippets.

@ryw
Created July 18, 2013 00:26
Show Gist options
  • Save ryw/6025779 to your computer and use it in GitHub Desktop.
Save ryw/6025779 to your computer and use it in GitHub Desktop.
My hacky script to deploy to Modulus
#!/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 ..
@wbashir
Copy link

wbashir commented Jul 18, 2013

I would suggest using the latest version of npm: 1.3.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment