sindresorhus / grunt-sass

Compile Sass to CSS
MIT License
1.01k stars 209 forks source link

No CSS generated when using 'dist: { files: {...}}' config object. #239

Closed actionnick closed 9 years ago

actionnick commented 9 years ago

On version 1.0.0.

I had my grunt config task setup to look something like this.

grunt.initConfig({
    sass: {
      example: {
        dist: {
          files: {
            'dest.css': '/src.scss'
          }
        }
      }
    }

But I saw that it was not generating any css. After running in verbose mode I saw that it wasn't even finding the files.

Running "sass:events" (sass) task
Verifying property sass.events exists in config...OK
File: [no files]

On a whim I just decided to remove the dist object (which the readme has in it), and voila, it worked. Final working config looked like this.

grunt.initConfig(sass: {
      example: {
        files: {
          'dest.css': 'src.scss'
        }
      }
    });
sindresorhus commented 9 years ago
grunt.initConfig({
    sass: {
      example: {
        dist: {
          files: {
            'dest.css': '/src.scss'
          }
        }
      }
    }

That config is invalid. One too much nesting. example is the target there. dist shouldn't be there. File/options config has nothing specifically to do with one task, but grunt in general. I'd suggest your read the grunt docs. Support questions are also better asked on StackOverflow.