Skip to content

Instantly share code, notes, and snippets.

@beshur
Created August 8, 2014 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beshur/a034bb116ea11ffbf139 to your computer and use it in GitHub Desktop.
Save beshur/a034bb116ea11ffbf139 to your computer and use it in GitHub Desktop.
Javascript Express node-sass config
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