Print line number from SCSS file in compiled CSS using gulp -sass

I recently switched from Grunt to Gulp.

Is it possible to display as a comment the line number in compiled CSS files that would indicate where this rule came from in the SASS file?

This feature was enabled by default when I used the grunt-contrib-compass module.

Now I use gulp-sass to compile my sass files.

+4
source share
1 answer

Yes, you need to pass the necessary parameters to it:

.pipe(sass({
  sourceComments: 'map',
  sourceMap: 'sass',
  outputStyle: 'nested'
}))
+12
source

All Articles