gruntjs / grunt-contrib-compass

Compile Compass to CSS.
http://gruntjs.com/
MIT License
626 stars 128 forks source link

Creation of sourcemaps fails with "invalid option" #213

Closed clentfort closed 9 years ago

clentfort commented 9 years ago

Hello, creation of source maps fails with following message:

Error: invalid option: --source-map

According to compass help compile the propper option is --sourcemap (one word, no hyphen)

Compass Version

compass --version
Compass 1.0.1 (Polaris)
Copyright (c) 2008-2014 Chris Eppstein
Released under the MIT License.
Compass is charityware.
Please make a tax deductable donation for a worthy cause: http://umdf.org/compass

Grunt Contrib Compass Version

less package.json | grep grunt-contrib-compass
"grunt-contrib-compass": "^1.0.1",

less node_modules/grunt-contrib-compass/package.json | grep '"version"'
"version": "1.0.1",
clentfort commented 9 years ago

Okay, stupid me! The option is sourcemap not sourceMap. Maybe you should mention somewhere in the documentation that how you treat the case of the options. (Turning camelCase into snake-case).

sindresorhus commented 9 years ago

It's in the docs: https://github.com/gruntjs/grunt-contrib-compass#sourcemap

clentfort commented 9 years ago

I know that sourcemap is in the docs, what is not in the docs is that sourceMaps will not be ignored (what would be a sensible default) or treated like sourcemap but will be turned into the flag --source-maps which will cause compass to fail!

It is nowhere mentioned that ANY field in the options-object will be converted from camelCase to snake-case and then passed to compass.