Just a demonstration for how to externalize options using grunt.file.readJSON('')
. Here is the full list of options for grunt-recess
(but this will work for other tasks as well).
recess: {
dist: {
options: {
// Default
compile : true, // Compiles CSS or LESS. Fixes white space and sort order.
compress : false, // Compress your compiled code
noIDs : true, // Doesn't complain about using IDs in your stylesheets
noJSPrefix : true, // Doesn't complain about styling .js- prefixed classnames
noOverqualifying : true, // Doesn't complain about overqualified selectors (ie: div#foo.bar)
noUnderscores : true, // Doesn't complain about using underscores in your class names
noUniversalSelectors: true, // Doesn't complain about using the universal * selector
prefixWhitespace : true, // Adds whitespace prefix to line up vender prefixed properties
strictPropertyOrder : true, // Complains if not strict property order
stripColors : false, // Strip colors from the Terminal output
// ^ Deprecated. Instead pass `--no-color` to grunt
zeroUnits : true // Doesn't complain if you add units to values of 0
},
files: {
'dist/combined.css': [
'src/main.css',
'src/component.css'
]
}
}
}