Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

grunt-contrib-sass prevent sourcemap

My Grunt setup is using sass to compile my .scss files to src/.css and cssmin to combine and minify my src/.css files to main.css.

I want to use the new sourcemap feature in SASS, but I'm not sure if it will really do anything for me considering cssmin will be putting all my css files into the main.css.

Does anyone have any insight into this?

I'm also, for now trying to turn off the sourcemap in grunt-contrib-sass and it won't take. Here's the relevant code in my Gruntfile.js:

sass: {
  dist: {
    options: {
      sourcemap: 'none'
    },
    files: [{
      expand: true,
      cwd: 'stylesheets/scss',
      src: ['**/*.scss'],
      dest: 'stylesheets/src',
      ext: '.css'
    }]
  }
},

from: github.com/gruntjs/grunt-contrib-sass

like image 286
Sparkmasterflex Avatar asked Aug 26 '14 14:08

Sparkmasterflex


1 Answers

I just had this problem and the other solutions didn't help me. Here's how I fixed it:

options: {
  "sourcemap=none": ''
}

Using sass version 3.4.2, and npm update didn't help

like image 182
Victor Avatar answered Nov 03 '22 20:11

Victor