Saturday, February 25, 2012

Getting Express project ready with Coffee.

# Utility script to create express project and make it ready with coffee scripts
# Assumes the availability of (express, js2coffee) node modules on path.


if [ "$PROJECTDIR" = "" ]; then
        echo "Usage: $0 projectname";


echo "   converting js to coffee and installing dependencies"

js2coffee app.js >; rm app.js
js2coffee routes/index.js > routes/; rm routes/index.js
npm install

echo "   \n$PROJECTDIR is ready now."
echo "   \$ cd $PROJECTDIR"
echo "   \$ coffee"

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?