Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Output the line number from the SCSS file in compiled CSS with gulp-sass

I've recently switched from Grunt to Gulp task runner.

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

Such feature was enabled by default when I was using grunt-contrib-compass module.

Now I'm using gulp-sass for compiling my sass files.

like image 352
luqo33 Avatar asked Dec 08 '22 03:12

luqo33


1 Answers

Yes it is possible you need to pass it the right options:

.pipe(sass({
  sourceComments: 'map',
  sourceMap: 'sass',
  outputStyle: 'nested'
}))
like image 72
deowk Avatar answered Feb 13 '23 03:02

deowk