1.0.0 • Published 9 years ago
grunt-cssnano-plus v1.0.0
grunt-cssnano-plus
A better cssnano grunt plugin for minifying CSS
Install
$ npm install --save-dev grunt-cssnano-plusAdvantages
- Support directory dest
- Support verbose message output
Usage
grunt.initConfig({
  cssnano: {
    options: {
      sourcemap: true
    },
    dist: {
      files: {
        'path/dist/index.min.css': 'path/src/index.css',
        'path/dist/app.min.css': 'path/src/app.css'
      }
    }
  }
});Or compile all the CSS files into a specific directory:
grunt.initConfig({
  cssnano: {
    options: {
      sourcemap: true
    },
    dist: {
      files: [{
          src: 'path/src/*.css',
          dest: 'path/dist/'
      }]
    }
  }
});Or customize multi-tasks:
grunt.initConfig({
  cssnano: {
    options: {
      sourcemap: true
    },
    subtask1: {
      files: [{
          src: 'path/src/*.css',
          dest: 'path/dist/'
      }]
    },
    subtask2: {
      files: {
        'path/dist/index.min.css': 'path/src/index.css',
        'path/dist/app.min.css': 'path/src/app.css'
      }
    }
  }
});Options
See the cssnano options.
License
grunt-cssnano-plus is available under the terms of the MIT license.
1.0.0
9 years ago