Skip to content

Instantly share code, notes, and snippets.

@joemccann
Created June 6, 2011 15:07
Show Gist options
  • Save joemccann/1010428 to your computer and use it in GitHub Desktop.
Save joemccann/1010428 to your computer and use it in GitHub Desktop.
Another express boilerplate with normalize.css and jQuery
# /bin/bash
# run from Express project root directory
# Dependencies: wget, node.js, npm, express
# change these to the versions you want
JQ="1.6.1"
echo '\nGenerating Express app.\n'
express -t ejs -c stylus
npm install ejs
npm install stylus
# rename to shorter names
echo '\nRenaming directories to shorter names.\n'
mv public/stylesheets public/css
mv public/javascripts/ public/js
mv public/images/ public/img
# remove dirs we don't use
echo '\nRemoving unused directories.\n'
rm -rf pids logs
rm -f public/css/style.styl public/css/style.css
echo '\nGrabbing files over HTTP.\n'
wget -O public/css/reset.css https://raw.github.com/necolas/normalize.css/master/normalize.css
wget -O public/js/jquery-$JQ.min.js http://ajax.googleapis.com/ajax/libs/jquery/$JQ/jquery.min.js
# convert CSS files to STYL files.
echo '\nConverting CSS files to Stylus files.\n'
stylus -C public/css/reset.css public/css/reset.styl
# TODO: add stylesheet links to layout.ejs
echo '\nBuild and fetch process complete.\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment