Skip to content

Instantly share code, notes, and snippets.

@chrisinajar
Created April 28, 2012 16:48
Show Gist options
  • Save chrisinajar/2520170 to your computer and use it in GitHub Desktop.
Save chrisinajar/2520170 to your computer and use it in GitHub Desktop.
stylus not working
app = express.createServer()
viewdir = __dirname + '/views'
staticdir = __dirname + '/static'
app.configure ->
app.use express.errorHandler({ dumpExceptions: true, showStack: true })
app.use express.logger()
app.use express.bodyParser()
app.set 'views', viewdir
app.set 'view engine', 'jade'
app.use '/css', stylus.middleware {
src: viewdir
dest: cssdir
debug: true
compile: (str, path)->
console.log 'Stylus', str, path
stylus(str)
.set('filename', path)
.set('warn', true)
.set('compress', true)
}
app.use '/css', express.static(cssdir)
app.use '/static', express.static(staticdir)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment