css - How to deactivate compressing in grunt less? -
the grunt-contrib-less
package provides option compress
, should allow managing uglifying/minifying/compression of destination css file. boolean
default value false
.
for reason woesn't work me -- whatever set parameter to, output css file compressed. ho working correctly?
gruntfile.js
module.exports = function(grunt) { // project configuration. grunt.initconfig({ pkg: grunt.file.readjson('package.json'), less: { development: { options: { paths: ["public/css"], compress: false }, files: { "public/css/style.css": "public/css/style.less" } }, production: { options: { paths: ["public/css"], compress: false, plugins: [ new (require('less-plugin-autoprefix'))({browsers: ["last 2 versions"]}), new (require('less-plugin-clean-css'))([]) ], modifyvars: { } }, files: { "public/css/style.css": "public/css/style.less" } } } }); // load plugin provides "less" task. grunt.loadnpmtasks('grunt-contrib-less'); // default task(s). grunt.registertask('default', ['less']); };
cli
$ grunt --version grunt-cli v0.1.13 grunt v0.4.5 $ grunt running "less:development" (less) task file public/css/style.css created running "less:production" (less) task file public/css/style.css created done, without errors.
it bad... css files have been compressed because of usage of less-plugin-clean-css
. after i've removed it, compressing can managed again compress
parameter.
Comments
Post a Comment