git clone --depth=1 git@github.com:kjs3/node-express-bootstrap.git
cd node-express-bootstrap
rm -rf .git
git init
Remove node_modules and bower_components from .gitignore if you want to track those.
… and you're on you're way.
npm install -g gulp bower
npm install
bower install
gulp
gulp watch
This starts a live-reload server that should automatically reload the page on css/js changes.
npm start
Gulpfile has cache-bust task that takes scss and js files from the assets directory, processes them (adding a fingerprint), and puts the result in the public directory.
The Express route uses a library to get those fingerprinted filenames from ./cache-bust.json and store them in jsSrc and cssSrc variables.
These vars are then used in the Jade template link tags to link to the fingerprinted file.
This process happens automatically with the gulp watch task.
A Gulp task and Procfile are included for deploying/running on Heroku.
Add the following config vars to your app
BUILDPACK_URL=https://github.com/timdp/heroku-buildpack-nodejs-gulp.git
NODE_ENV=production
npm_config_production=false
When you push to Heroku the 'heroku:production' Gulp task will be run which in turn just runs the 'cache-bust' task that fingerprints css/js files.