Commit 21ac22e4 by Adeel

renderSync: Returns both css and map.

parent 9ce6de02
......@@ -294,5 +294,8 @@ module.exports.middleware = function() {
endStats(options, options.stats.sourceMap);
return output;
return {
css: output,
map: options.stats.sourceMap
};
};
......@@ -143,7 +143,7 @@ describe('api', function() {
it('should compile sass to css', function(done) {
var src = read(fixture('simple/index.scss'), 'utf8');
var expected = read(fixture('simple/expected.css'), 'utf8').trim();
var css = sass.renderSync({data: src}).trim();
var css = sass.renderSync({data: src}).css.trim();
assert.equal(css, expected.replace(/\r\n/g, '\n'));
done();
......@@ -155,7 +155,7 @@ describe('api', function() {
var css = sass.renderSync({
data: src,
indentedSyntax: true
}).trim();
}).css.trim();
assert.equal(css, expected.replace(/\r\n/g, '\n'));
done();
......
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