Created
October 14, 2012 02:04
-
-
Save monkyz/3886998 to your computer and use it in GitHub Desktop.
installing nib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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