grunt-rev-package

Revision your files with your package.json revision

npm install grunt-rev-package
1 downloads in the last day
1 downloads in the last week
33 downloads in the last month

grunt-rev-package

+---------------------------------------------+
|                                             |
| Current version is Grunt 0.4.0 compatible.  |
| Version 0.0.6+ is Grunt 0.4.0 compatible.  |
|                                             |
| Version 0.0.5 is Grunt 0.3.17 compatible.  |
|                                             |
+---------------------------------------------+

Description

A grunt task that adds your package.json revision at the end of your file name. This can be used for staying organized and/or cache busting.

This task renames files, so suggested use is in a temp or dist directory... not in the dev directory!

This task can be combined nicely with grunt-bump and can be run before or after minification depending on where you want the .min to end up.

This is a multi task.

Usage

Example usage in grunt init:

    revPackage: {
        example1: 'temp/scripts/**/*.js',
        example2: 'temp/js/*.js'
    },

If your package.json.version is 0.1.0 then the following file

/temp/scripts/file.js

would be changed to:

/temp/scripts/file.0.1.0.js

example1 would affect all js files in temp/scripts and all subdirectories. example2 would only affect files in temp/js and not subdirectories. This second version is useful if you - for example - have a vendor sub directory that you wish to remain untouched.

Installation and Use

To use this package, put it as a dependency in your package.json, and then run npm install.

Load the grunt task in your grunt.js

grunt.loadNpmTasks('grunt-rev-package');

Tests

Tests can be run from teh grunt-rev-package directory using:

npm install
npm test

You can inspect the sample output created. The tests can be run by either cloning the git repo or from this module's directory inside the node_modules folder of your project.

Release Notes

0.0.6 - Feb 24, 2013 - Grunt 0.4.0 support


NPM package

npm loves you