Created
August 8, 2014 13:46
-
-
Save beshur/a034bb116ea11ffbf139 to your computer and use it in GitHub Desktop.
Javascript Express node-sass config
This file contains 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
var express = require('express'), | |
// ... other packages | |
sass = require('node-sass'); | |
// ... | |
var app = express(); | |
// ... | |
// Commented this default express generator line: | |
// app.use(require('stylus').middleware(path.join(__dirname, 'public'))); | |
// | |
// Because of some bug the node-sass (http://git.io/eItWzA) does not scan the correct folders, | |
// so I have both .scss and final .css in one /public/css/ folder | |
app.use( | |
sass.middleware({ | |
src: __dirname + '/public/', // where the sass files are | |
dest: __dirname + '/public/', // where css should go | |
}) | |
); | |
// ... rest of app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See http://stackoverflow.com/questions/4344785/node-js-express-jade-compile-sass-less/25205034#25205034