Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
renderSync: Returns both css and map.
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 committed Dec 14, 2014
1 parent 35414a3 commit 125f646
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,8 @@ module.exports.renderSync = function(options) {

endStats(options, options.stats.sourceMap);

return output;
return {
css: output,
map: options.stats.sourceMap
};
};
4 changes: 2 additions & 2 deletions test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit 125f646

Please sign in to comment.