Merge pull request #26 from tomasdev/master

Adds support for 'normal' sourceComments
This commit is contained in:
David Manning 2014-02-21 16:04:59 -08:00
commit 62328fac18
2 changed files with 3 additions and 3 deletions

View file

@ -44,7 +44,7 @@ Pass in your own callback to be called upon a sass error from node-sass. The cal
## Source Maps
gulp-sass now generates *inline* source maps if you pass `sourceComments: map` as an option. Note that gulp-sass will *only* generate inline source maps, so passing `sourceMap: filepath` to node-sass won't actually do anything. Enjoy your source maps!
gulp-sass now generates *inline* source maps if you pass `sourceComments: 'map'` as an option. It can also accept `sourceComments: 'normal'` as option, to generate the per-rule comment to point to the file where it came from. Note that gulp-sass won't actually do anything when passing `sourceMap: filepath`. Enjoy your source maps!
NB: For those wondering, inline source maps are stuck onto the end of the css file instead of being in a separate map file. In this case, the original source contents are included as well, so you don't have to make sure your scss files are servable.

View file

@ -20,7 +20,7 @@ module.exports = function (options) {
return cb();
}
if (opts.sourceComments === 'map') {
if (opts.sourceComments === 'map' || opts.sourceComments === 'normal') {
opts.file = file.path;
} else {
opts.data = file.contents.toString();
@ -84,4 +84,4 @@ function getSourcesContent (sources) {
}
return sourcesContent;
}
}