grunt-cssbeautifier

cssbeautify.com for grunt

grunt-cssbeautifier

cssbeautify.com for grunt

This plugin recommends using Grunt ~0.4.1.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-cssbeautifier --save-dev

One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-cssbeautifier');
  • cssbeautifier
    • files (required): Your source files to beautify
    • options (optional): Overwrite default cssbeautifier options
cssbeautifier : {
  files : ["src/**/*.css"]
}

Default options from cssbeautify will be used

cssbeautifier : {
  files : ["src/**/*.css"],
  options : {
    indent: '  ',
    openbrace: 'end-of-line',
    autosemicolon: false
  }
}

Only specifiy options to overwrite

  • 0.1.0: Initial version.