node.js - Grunt CSS min - Issue with minifying different CSS files -
i'm having issue minifying multiple css files using grunt cssmin i'm not looking minify files single file. have files having same name min.css extension.
my gruntfile.js follows.
module.exports = function (grunt) { grunt.initconfig({ cssmin: { target: { files: [{ src: ['assets/css/*.css', '!assets/css/*.min.css'], // source files mask dest: 'assets/css/', // destination folder expand: true, // allow dynamic building flatten: true, // remove unnecessary nesting ext: '.min.css' // replace .css .min.css }], /* below trick used minify files skipped above */ /*files: [{ src: ['assets/css/home.css', 'assets/css/institutions.css', 'assets/css/form-elements.css'], // source files mask dest: 'assets/css/', // destination folder expand: true, // allow dynamic building flatten: true, // remove unnecessary nesting ext: '.min.css' // replace .css .min.css }],*/ } } }); grunt.loadnpmtasks('grunt-contrib-cssmin'); grunt.registertask('default', [ 'cssmin' ]); };
as per code (except commented out part), suppose minify css files. reason skips few css files directory. minify those, have comment out first files[{}]
, uncomment later.
it doesn't work when both files[{}]
uncommented. i'm clueless on why happening.
my nodejs version is: v0.10.25
thanks in advance.
note: used warnings & task aborts on grunt cssmin
due node version issue , got fixed downgrading nvm version nvm v0.10.39. blindmoe pointing solution
Comments
Post a Comment