https://github.com/sha-red/compass-mixins/tree/master/lib
extended with more sass frameworks and as django app.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
568 B
19 lines
568 B
var sass = require('node-sass'); |
|
var libDir = __dirname.replace(/test\/helper$/, 'lib'); |
|
var chalk = require('chalk'); |
|
|
|
module.exports = function(data, callback, imports) { |
|
imports = imports ? imports.map(function(i){ return '@import "'+libDir+'/'+i+'";'}) : []; |
|
|
|
sass.render({ |
|
data: '@import "'+libDir+'/compass/functions";' + imports.join('') + data, |
|
outputStyle: 'compressed', |
|
success: function(output){ |
|
callback(output); |
|
}, |
|
error: function(err){ |
|
console.log(chalk.red("Sass error:"), err); |
|
callback('', err); |
|
} |
|
}); |
|
} |