1.0.0 • Published 9 years ago

grunt-jsonmin2 v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

grunt-jsonmin2

Minify your JSON files to save some bytes.

Getting Started

This plugin requires 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-jsonmin2 --save-dev

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

grunt.loadNpmTasks('grunt-jsonmin2');

The jsonmin2 task

Run this task with the grunt jsonmin2 command.

Options

This task defined the following options:

report

Type: string Choices: 'min', 'gzip' Default: 'min'

Report minification result or both minification and gzip results. This is useful to see exactly how well the JSON files are minifying but using 'gzip' will make the task take 5-10x longer to complete. Example output.

Usage

jsonmin2: {
  target: {
    files: {
      expand: true,
      cwd: 'release/data',
      src: '*.json',
      dest: 'release/data'
    }
  }
}

License

Copyright (c) 2015 hosting.de GmbH. Licensed under the MIT license.