UNPKG

grunt-shrinkpack

Version:

Provides a task for Shrinkpack to run. Requires grunt-shrinkwrap to run before grunt-shrinkpack, as Shrinkpack uses the json file generated by Shrinkwrap.

33 lines (21 loc) 1.38 kB
# grunt-shrinkpack > Provides a minimalist task for Shrinkpack to run. Requires grunt-shrinkwrap to run before grunt-shrinkpack (see below), as Shrinkpack uses the json file generated by Shrinkwrap. ## Getting Started This plugin requires Grunt `~0.4.5` If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command: ```shell npm install grunt-shrinkpack --save-dev ``` Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript: ```js grunt.loadNpmTasks('grunt-shrinkpack'); ``` Then add shrinkpack as a subtask within a defined build: ```js grunt.registerTask('default', ['sass', 'uglify', 'cssmin', 'copy', 'replace', 'shrinkwrap', 'shrinkpack']); ``` ## Contributing In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/). ## Release History 0.0.1 - Initial release 0.0.2 - Updated this README.md file and modified the shrinkpack task registration utilized.