Skip to content

Instantly share code, notes, and snippets.

@monkyz
Created October 14, 2012 02:04
Show Gist options
  • Save monkyz/3886998 to your computer and use it in GitHub Desktop.
Save monkyz/3886998 to your computer and use it in GitHub Desktop.
installing nib
//first, require nib in the beginning of the file. note that requiring stylus was needed due to the second code change below:
, nib = require('nib')
, stylus = require('stylus');
//second change:
app.use(stylus.middleware({ src: __dirname + '/public',
compile: compile
}));
//third change, added the function compile:
function compile(str, path) {
return stylus(str)
.set('filename', path)
.set('compress', true)
.use(nib());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment