Commit 60f66275 by Dean Mao

Merge pull request #39 from chrisleishman/pass_render_options

Pass options to render from middleware
parents 3ec82e67 b5b96bfa
......@@ -74,7 +74,8 @@ module.exports = function(options){
var path = url.parse(req.url).pathname;
if (/\.css$/.test(path)) {
var cssPath = join(dest, path)
, sassPath = join(src, path.replace('.css', '.scss'));
, sassPath = join(src, path.replace('.css', '.scss'))
, sassDir = dirname(sassPath)
if (debug) {
log('source', sassPath);
......@@ -107,6 +108,9 @@ module.exports = function(options){
if (err) return error(err);
fs.writeFile(cssPath, css, 'utf8', next);
});
}, {
include_paths: [ sassDir ].concat(options.include_paths || []),
output_style: options.output_style
});
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment