{"_id":"grunt-userev","_rev":"36-a78092d7e7c98cf07caf8be1a96f80f5","name":"grunt-userev","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.1":{"name":"grunt-userev","version":"0.0.1","keywords":["gruntplugin"],"author":{"url":"http://www.salsitasoft.com/","name":"Salsita Software"},"_id":"grunt-userev@0.0.1","maintainers":[{"name":"salsita","email":"matthew@salsitasoft.com"}],"homepage":"https://github.com/salsita/grunt-userev","bugs":{"url":"https://github.com/salsita/grunt-userev/issues"},"dist":{"shasum":"09438eec51ff919dbd885d0a68ed41e215d32055","tarball":"https://registry.npmjs.org/grunt-userev/-/grunt-userev-0.0.1.tgz","integrity":"sha512-o78EWnTf22bUjB+5mTT3kZze1bQEbFR5fYR1R0oxzGIW1arPjtTApYuwE+ZSiCDQ1pdlvZ6s9zO+A4y3kGG6Hw==","signatures":[{"sig":"MEUCIA1Q2RaX289PIDFt4DXBzGyZcGYHvPJSVKBLWgjL3OsCAiEAyjOlgBL+FdAGUWI8xuf5e5Jv0tV7ok0rGH7TbsEk2Gw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"Gruntfile.js","_from":".","readme":"# grunt-userev <a href='https://github.com/salsita'><img align='right' title='Salsita' src='https://www.google.com/a/cpanel/salsitasoft.com/images/logo.gif?alpha=1' _src='https://1.gravatar.com/avatar/d413290a5fe1385efcf5a344d4a0b588?s=50' /></a>\n\n<a href='https://npmjs.org/package/grunt-userev'><img align='right' alt='npm' title='npm info' src='https://nodei.co/npm/grunt-userev.png?compact=true' /></a>\n\n> Update references to assets versioned with [grunt-filerev](https://github.com/yeoman/grunt-filerev). Leaner and faster than [grunt-usemin](https://github.com/yeoman/grunt-usemin), and able to update already versioned references.\n\n[![build](https://secure.travis-ci.org/salsita/grunt-userev.png?branch=master)](https://travis-ci.org/salsita/grunt-userev) [![npm version](https://badge.fury.io/js/grunt-userev.png)](https://npmjs.org/package/grunt-userev) [![dependencies](https://david-dm.org/salsita/grunt-userev.png)](https://david-dm.org/salsita/grunt-userev) [![dev-dependencies](https://david-dm.org/salsita/grunt-userev/dev-status.png)](https://david-dm.org/salsita/grunt-userev#info=devDependencies)\n\n## Getting Started\n\nThis plugin requires [Grunt](http://gruntjs.com).\n\nIf you haven't used Grunt 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:\n\n```shell\nnpm install grunt-userev --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-userev');\n```\n\n\n## The \"userev\" task\n\n### Overview\n\nIn your project's Gruntfile, configure `userev` to update references to assets versioned by [grunt-filerev](https://github.com/yeoman/grunt-filerev). It will automatically use [`grunt.filerev.summary`](https://github.com/yeoman/grunt-filerev#summary).\n\n\n```js\ngrunt.initConfig({\n  filerev: {\n    options: {\n      encoding: 'utf8',\n      algorithm: 'md5',\n      length: 8\n    },\n    sourcemaps: {        // Rename sourcemaps.\n      src: ['build/css/*.map.css', 'build/js/*.map.js'],\n    },\n    assets: {            // Rename minified js/css.\n      src: ['build/css/*.css', 'build/js/*.js', '!build/css/*.map.css', '!build/js/*.map.js'],\n    },\n  },\n\n  userev: {\n    options: {\n      hash: /(\\.[a-f0-9]{8})\\.[a-z]+$/,\n    },\n    assets: {            // Link to sourcemaps in minified js/css.\n      src: ['build/css/*.css', 'build/js/*.js', '!build/css/*.map.css', '!build/js/*.map.js'],\n      options: {\n        patterns: {\n          'Linking versioned source maps': /sourceMappingURL=([a-z0-9.]*\\.map)/,\n        },\n      },\n    },\n    index: {             // Link to minified js/css in index html.\n      src: 'build/index.html',\n      options: {\n        patterns: {\n          'Linking versioned assets': /(css\\/[a-z0-9.]*\\.css)/,\n        },\n      },\n    },\n  },\n});\n\ngrunt.registerTask( 'rev', [\n  'filerev:sourcemaps',  // Rename sourcemaps.\n  'userev:assets',       // Link to sourcemaps in minified js/css.\n  'filerev:assets',      // Rename minified js/css.\n  'userev:index',        // Link to minified js/css in index html.\n]);\n\n```\n\n\n### Options\n\n#### patterns\nType: `Object {Key: RegExp}`\nDefault: none\n\nReference RegExp patterns are matched in source files. The first matched group is checked if it matches ending of any key in [`grunt.filerev.summary`](https://github.com/yeoman/grunt-filerev#summary). The key names are used to log processing of matched patterns.\n\n#### hash\nType: `RegExp`\nDefault: none\n\nIf specified, the RegExp pattern is matched against matched references and the first matched group (the hash in filename) is removed. This allows to update the references in source files multiple times without need to regenerate them.\n\n\n## Roadmap\n\n- Add changelog\n- Extend tests\n\n\n## Contributing\n\nWelcome to the project. Choose a way that suits you. You'll need a [GitHub account](https://github.com/signup/free).\n\n### Submit a bug, or feature request\n\n* Search [existing issues](https://github.com/salsita/grunt-userev/issues) to avoid duplicities.\n* [Submit an issue](https://github.com/salsita/grunt-userev/issues/new) with label `bug`, or `enhancement`.\n* For a bug, include any relevant information, e.g. task output, installed OS/Node.js/Grunt/grunt-userev versions, and steps to reproduce.\n\n### Submit a pull request\n\n* [Fork the repository](https://github.com/salsita/grunt-userev/fork) ([help](https://help.github.com/articles/fork-a-repo)) and checkout new branch prefixed with either `feature-`, or `fix-`, or `docs-`, or `chore-`.\n* [Use](https://github.com/salsita/grunt-userev/blob/master/.jshintrc) the [popular JavaScript style convention](http://sideeffect.kr/popularconvention#javascript) and [winning JavaScript style](http://seravo.fi/2013/javascript-the-winning-style) with exception of 100 characters per line. In short, use 2 spaces indent, camelCase names, trailing comma, single quotes, semicolons, sparse spacing, and no trailing whitespace.\n* For a bugfix, write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix.\n* For a new feature, add tests that cover the feature.\n* Lint and test your code by running `grunt`, or `grunt watch` to watch source files and run tests on any change.\n* Use commit messages suitable for generating [changelog](https://github.com/salsita/grunt-userev/blob/master/CHANGELOG.md) and following [Karma/Angular commit message convention](https://github.com/karma-runner/karma/blob/master/docs/dev/04-git-commit-msg.md) ([docs](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#)). In short, use `<type>(<scope>): <subject>` header in imperative present tense, message body describing motivation/differences, and footer referencing related issues and breaking changes.\n* [Create a pull request](https://github.com/salsita/grunt-userev/compare) ([help](https://help.github.com/articles/creating-a-pull-request)) to [grunt-userev](https://github.com/salsita/grunt-userev) [master](https://github.com/salsita/grunt-userev/branches) branch.\n\n\n## License\n\nCopyright 2013 [Salsita Software](http://salsitasoft.com). Licensed under the [MIT License](http://en.wikipedia.org/wiki/MIT_License).\n","engines":{"node":">= 0.8.0"},"scripts":{"test":"grunt test"},"_npmUser":{"name":"salsita","email":"matthew@salsitasoft.com"},"licenses":[{"type":"MIT"}],"repository":{"url":"git://github.com/salsita/grunt-userev.git","type":"git"},"_npmVersion":"1.3.11","description":"Update references to assets versioned with grunt-filerev. Leaner and faster than grunt-usemin, and able to update already versioned references.","directories":{},"readmeFilename":"README.md","devDependencies":{"grunt":"~0.4.0rc2","grunt-npm":"0.0.2","grunt-bump":"0.0.11","grunt-release":"~0.6.0","jshint-stylish":"~0.1.3","load-grunt-tasks":"~0.2.0","grunt-contrib-clean":"~0.4.0","grunt-contrib-watch":"~0.5.3","grunt-contrib-jshint":"~0.2.0","grunt-contrib-nodeunit":"~0.1.2","grunt-conventional-changelog":"~1.0.0"}},"0.0.2":{"name":"grunt-userev","version":"0.0.2","keywords":["gruntplugin"],"author":{"url":"http://www.salsitasoft.com/","name":"Salsita Software"},"_id":"grunt-userev@0.0.2","maintainers":[{"name":"salsita","email":"matthew@salsitasoft.com"}],"homepage":"https://github.com/salsita/grunt-userev","bugs":{"url":"https://github.com/salsita/grunt-userev/issues"},"dist":{"shasum":"0b8dc9338049061b3be71ce764ad4aa522f6c4c1","tarball":"https://registry.npmjs.org/grunt-userev/-/grunt-userev-0.0.2.tgz","integrity":"sha512-E4CyaRaIJEQCUVZqSPYo4/VNS5F6qQ6ak/qn7XNygRjm/egrnakmsUE9Cneg5AfEiy3ZaXFRM0xO4gADoPwg2g==","signatures":[{"sig":"MEUCIQD+CnIgYdwxM86fW/PcuFqQrxol5mZ7uraTTL65O5e4lwIgDnM0Aq6X2IdQLMKXUE9/UjYYI5boqurQafuj+TUkgos=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"Gruntfile.js","_from":".","readme":"# grunt-userev <a href='https://github.com/salsita'><img align='right' title='Salsita' src='https://www.google.com/a/cpanel/salsitasoft.com/images/logo.gif?alpha=1' _src='https://1.gravatar.com/avatar/d413290a5fe1385efcf5a344d4a0b588?s=50' /></a>\n\n<a href='https://npmjs.org/package/grunt-userev'><img align='right' alt='npm' title='npm info' src='https://nodei.co/npm/grunt-userev.png?compact=true' /></a>\n\n> Update references to assets versioned with [grunt-filerev](https://github.com/yeoman/grunt-filerev). Leaner and faster than [grunt-usemin](https://github.com/yeoman/grunt-usemin), and able to update already versioned references.\n\n[![build](https://secure.travis-ci.org/salsita/grunt-userev.png?branch=master)](https://travis-ci.org/salsita/grunt-userev) [![npm version](https://badge.fury.io/js/grunt-userev.png)](https://npmjs.org/package/grunt-userev) [![dependencies](https://david-dm.org/salsita/grunt-userev.png)](https://david-dm.org/salsita/grunt-userev) [![dev-dependencies](https://david-dm.org/salsita/grunt-userev/dev-status.png)](https://david-dm.org/salsita/grunt-userev#info=devDependencies)\n\r\n\n## Getting Started\n\nThis plugin requires [Grunt](http://gruntjs.com).\n\nIf you haven't used Grunt 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:\n\n```shell\nnpm install grunt-userev --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-userev');\n```\n\r\n\n## The \"userev\" task\n\n### Overview\n\nIn your project's Gruntfile, configure `userev` to update references to assets versioned by [grunt-filerev](https://github.com/yeoman/grunt-filerev). It will automatically use [`grunt.filerev.summary`](https://github.com/yeoman/grunt-filerev#summary).\n\n\n```js\ngrunt.initConfig({\n  filerev: {\n    options: {\n      encoding: 'utf8',\n      algorithm: 'md5',\n      length: 8\n    },\n    sourcemaps: {        // Rename sourcemaps.\n      src: ['build/css/*.map.css', 'build/js/*.map.js'],\n    },\n    assets: {            // Rename minified js/css.\n      src: ['build/css/*.css', 'build/js/*.js', '!build/css/*.map.css', '!build/js/*.map.js'],\n    },\n  },\n\n  userev: {\n    options: {\n      hash: /(\\.[a-f0-9]{8})\\.[a-z]+$/,\n    },\n    assets: {            // Link to sourcemaps in minified js/css.\n      src: ['build/css/*.css', 'build/js/*.js', '!build/css/*.map.css', '!build/js/*.map.js'],\n      options: {\n        patterns: {\n          'Linking versioned source maps': /sourceMappingURL=([a-z0-9.]*\\.map)/,\n        },\n      },\n    },\n    index: {             // Link to minified js/css in index html.\n      src: 'build/index.html',\n      options: {\n        patterns: {\n          'Linking versioned assets': /(css\\/[a-z0-9.]*\\.css)/,\n        },\n      },\n    },\n  },\n});\n\ngrunt.registerTask( 'rev', [\n  'filerev:sourcemaps',  // Rename sourcemaps.\n  'userev:assets',       // Link to sourcemaps in minified js/css.\n  'filerev:assets',      // Rename minified js/css.\n  'userev:index',        // Link to minified js/css in index html.\n]);\n\n```\n\r\n\n### Options\n\n#### patterns\nType: `Object {Key: RegExp}`\nDefault: none\n\nReference RegExp patterns are matched in source files. The first matched group is checked if it matches ending of any key in [`grunt.filerev.summary`](https://github.com/yeoman/grunt-filerev#summary). The key names are used to log processing of matched patterns.\n\n#### hash\nType: `RegExp`\nDefault: none\n\nIf specified, the RegExp pattern is matched against matched references and the first matched group (the hash in filename) is removed. This allows to update the references in source files multiple times without need to regenerate them.\n\r\n\n## Contributing\n\nWelcome to the project. Choose a way that suits you. You'll need a [GitHub account](https://github.com/signup/free).\n\n### Submit a bug, or feature request\n\n* Search [existing issues](https://github.com/salsita/grunt-userev/issues) to avoid duplicities.\n* [Submit an issue](https://github.com/salsita/grunt-userev/issues/new) with label `bug`, or `enhancement`.\n* For a bug, include any relevant information, e.g. task output, installed OS/Node.js/Grunt/grunt-userev versions, and steps to reproduce.\n\n### Submit a pull request\n\n* [Fork the repository](https://github.com/salsita/grunt-userev/fork) ([help](https://help.github.com/articles/fork-a-repo)) and checkout new branch prefixed with either `feature-`, or `fix-`, or `docs-`, or `chore-`.\n* [Use](https://github.com/salsita/grunt-userev/blob/master/.jshintrc) the [popular JavaScript style convention](http://sideeffect.kr/popularconvention#javascript) and [winning JavaScript style](http://seravo.fi/2013/javascript-the-winning-style) with exception of 100 characters per line. In short, use 2 spaces indent, camelCase names, trailing comma, single quotes, semicolons, sparse spacing, and no trailing whitespace.\n* For a bugfix, write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix.\n* For a new feature, add tests that cover the feature.\n* Lint and test your code by running `grunt`, or `grunt watch` to watch source files and run tests on any change.\n* Use commit messages suitable for generating [changelog](#changelog) and following [Karma/Angular commit message convention](https://github.com/karma-runner/karma/blob/master/docs/dev/04-git-commit-msg.md) ([docs](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#)). In short, use `<type>(<scope>): <subject>` header in imperative present tense, message body describing motivation/differences, and footer referencing related issues and breaking changes.\n* [Create a pull request](https://github.com/salsita/grunt-userev/compare) ([help](https://help.github.com/articles/creating-a-pull-request)) to [grunt-userev](https://github.com/salsita/grunt-userev) [master](https://github.com/salsita/grunt-userev/branches) branch.\n\r\n\n## Roadmap\n\n- Add tests\n\n\n<a name=\"changelog\"></a>\n## Changelog\n\r\n<a name=\"v0.0.2\"></a>\n### v0.0.2 (2013-11-21)\n\n\n#### Features\n\n* **changelog:**\n  * add changelog to README ([0c70f8d2](https://github.com/salsita/grunt-userev/commit/0c70f8d2569534215575dfef037936018d26a70e))\n  * add changelog ([3617bb0a](https://github.com/salsita/grunt-userev/commit/3617bb0af7bb733857cc3fdf391bb20a92631df7))\n\n<a name=\"v0.0.1\"></a>\n### v0.0.1 (2013-11-21)\n\n\n#### Features\n\n* **task:** create grunt userev task ([d9f515c4](https://github.com/salsita/grunt-userev/commit/d9f515c4b74c980231f006dfdaaf4727ccd42aae))\n\r\n\n## License\n\nCopyright 2013 [Salsita Software](http://salsitasoft.com). Licensed under the [MIT License](http://en.wikipedia.org/wiki/MIT_License).\n","engines":{"node":">= 0.8.0"},"scripts":{"test":"grunt test"},"_npmUser":{"name":"salsita","email":"matthew@salsitasoft.com"},"licenses":[{"type":"MIT"}],"repository":{"url":"https://github.com/salsita/grunt-userev","type":"git"},"_npmVersion":"1.3.11","description":"Update references to assets versioned with grunt-filerev. Leaner and faster than grunt-usemin, and able to update already versioned references.","directories":{},"readmeFilename":"README.md","devDependencies":{"grunt":"~0.4.0rc2","jshint-stylish":"~0.1.3","load-grunt-tasks":"~0.2.0","grunt-contrib-clean":"~0.5.0","grunt-contrib-watch":"~0.5.3","grunt-contrib-concat":"~0.3.0","grunt-contrib-jshint":"~0.7.2","grunt-contrib-nodeunit":"~0.2.2","grunt-conventional-changelog":"~1.0.0"}},"0.0.3":{"name":"grunt-userev","version":"0.0.3","keywords":["gruntplugin"],"author":{"url":"http://www.salsitasoft.com/","name":"Salsita Software"},"_id":"grunt-userev@0.0.3","maintainers":[{"name":"salsita","email":"matthew@salsitasoft.com"}],"homepage":"https://github.com/salsita/grunt-userev","bugs":{"url":"https://github.com/salsita/grunt-userev/issues"},"dist":{"shasum":"642669cdc2fd0b3c9a28e315b49143183fb16b9a","tarball":"https://registry.npmjs.org/grunt-userev/-/grunt-userev-0.0.3.tgz","integrity":"sha512-7LTMybGX10UCAPclGBjnSGiJHueN9wSreURpdS607fOJzoPYXrz0IquBaOYAYMonDlRNAvphI4BMOx85ZXUMjg==","signatures":[{"sig":"MEUCIAgCVPiQV83qPLCnlIg7lvxiRhIgrk6BAfdqvNwOoxIWAiEAjQDf/2PwBDYFlsV7p+xn235ViDmPQy1WrRbPCL49V9U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"Gruntfile.js","_from":".","readme":"# grunt-userev <a href='https://github.com/salsita'><img align='right' title='Salsita' src='https://www.google.com/a/cpanel/salsitasoft.com/images/logo.gif?alpha=1' _src='https://1.gravatar.com/avatar/d413290a5fe1385efcf5a344d4a0b588?s=50' /></a>\n\n> Update references to assets versioned with [grunt-filerev](https://github.com/yeoman/grunt-filerev). Leaner and faster than [grunt-usemin](https://github.com/yeoman/grunt-usemin), and able to update already versioned references.\n\n<a href='https://npmjs.org/package/grunt-userev'><img align='left' alt='npm' title='npm info' src='https://nodei.co/npm/grunt-userev.png?compact=true' /></a>\n\n&nbsp;[![build](https://secure.travis-ci.org/salsita/grunt-userev.png?branch=master)](https://travis-ci.org/salsita/grunt-userev) [![npm version](https://badge.fury.io/js/grunt-userev.png)](https://npmjs.org/package/grunt-userev) [![dependencies](https://david-dm.org/salsita/grunt-userev.png)](https://david-dm.org/salsita/grunt-userev) [![dev-dependencies](https://david-dm.org/salsita/grunt-userev/dev-status.png)](https://david-dm.org/salsita/grunt-userev#info=devDependencies)\n\r\n\n## Getting Started\n\nThis plugin requires [Grunt](http://gruntjs.com).\n\nIf you haven't used Grunt 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:\n\n```shell\nnpm install grunt-userev --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-userev');\n```\n\r\n\n## The \"userev\" task\n\n### Overview\n\nIn your project's Gruntfile, configure `userev` to update references to assets versioned by [grunt-filerev](https://github.com/yeoman/grunt-filerev). It will automatically use [`grunt.filerev.summary`](https://github.com/yeoman/grunt-filerev#summary).\n\n\n```js\ngrunt.initConfig({\n  filerev: {\n    options: {\n      encoding: 'utf8',\n      algorithm: 'md5',\n      length: 8\n    },\n    sourcemaps: {        // Rename sourcemaps.\n      src: ['build/css/*.map.css', 'build/js/*.map.js'],\n    },\n    assets: {            // Rename minified js/css.\n      src: ['build/css/*.css', 'build/js/*.js', '!build/css/*.map.css', '!build/js/*.map.js'],\n    },\n  },\n\n  userev: {\n    options: {\n      hash: /(\\.[a-f0-9]{8})\\.[a-z]+$/,\n    },\n    assets: {            // Link to sourcemaps in minified js/css.\n      src: ['build/css/*.css', 'build/js/*.js', '!build/css/*.map.css', '!build/js/*.map.js'],\n      options: {\n        patterns: {\n          'Linking versioned source maps': /sourceMappingURL=([a-z0-9.]*\\.map)/,\n        },\n      },\n    },\n    index: {             // Link to minified js/css in index html.\n      src: 'build/index.html',\n      options: {\n        patterns: {\n          'Linking versioned assets': /(css\\/[a-z0-9.]*\\.css)/,\n        },\n      },\n    },\n  },\n});\n\ngrunt.registerTask( 'rev', [\n  'filerev:sourcemaps',  // Rename sourcemaps.\n  'userev:assets',       // Link to sourcemaps in minified js/css.\n  'filerev:assets',      // Rename minified js/css.\n  'userev:index',        // Link to minified js/css in index html.\n]);\n\n```\n\r\n\n### Options\n\n#### patterns\nType: `Object {Key: RegExp}`\nDefault: none\n\nReference RegExp patterns are matched in source files. The first matched group is checked if it matches ending of any key in [`grunt.filerev.summary`](https://github.com/yeoman/grunt-filerev#summary). The key names are used to log processing of matched patterns.\n\n#### hash\nType: `RegExp`\nDefault: none\n\nIf specified, the RegExp pattern is matched against matched references and the first matched group (the hash in filename) is removed. This allows to update the references in source files multiple times without need to regenerate them.\n\r\n\n## Contributing\n\nWelcome to the project. Choose a way that suits you. You'll need a [GitHub account](https://github.com/signup/free).\n\n### Submit a bug, or feature request\n\n* Search [existing issues](https://github.com/salsita/grunt-userev/issues) to avoid duplicities.\n* [Submit an issue](https://github.com/salsita/grunt-userev/issues/new) with label `bug`, or `enhancement`.\n* For a bug, include any relevant information, e.g. task output, installed OS/Node.js/Grunt/grunt-userev versions, and steps to reproduce.\n\n### Submit a pull request\n\n* [Fork the repository](https://github.com/salsita/grunt-userev/fork) ([help](https://help.github.com/articles/fork-a-repo)) and checkout new branch prefixed with either `feature-`, or `fix-`, or `docs-`, or `chore-`.\n* [Use](https://github.com/salsita/grunt-userev/blob/master/.jshintrc) the [popular JavaScript style convention](http://sideeffect.kr/popularconvention#javascript) and [winning JavaScript style](http://seravo.fi/2013/javascript-the-winning-style) with exception of 100 characters per line. In short, use 2 spaces indent, camelCase names, trailing comma, single quotes, semicolons, sparse spacing, and no trailing whitespace.\n* For a bugfix, write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix.\n* For a new feature, add tests that cover the feature.\n* Lint and test your code by running `grunt`, or `grunt watch` to watch source files and run tests on any change.\n* Use commit messages suitable for generating [changelog](#changelog) and following [Karma/Angular commit message convention](https://github.com/karma-runner/karma/blob/master/docs/dev/04-git-commit-msg.md) ([docs](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#)). In short, use `<type>(<scope>): <subject>` header in imperative present tense, message body describing motivation/differences, and footer referencing related issues and breaking changes.\n* [Create a pull request](https://github.com/salsita/grunt-userev/compare) ([help](https://help.github.com/articles/creating-a-pull-request)) to [grunt-userev](https://github.com/salsita/grunt-userev) [master](https://github.com/salsita/grunt-userev/branches) branch.\n\r\n\n## Roadmap\n\n- Add tests\n\n\n<a name=\"changelog\"></a>\n## Changelog\n\r\n<a name=\"v0.0.2\"></a>\n### v0.0.2 (2013-11-21)\n\n\n#### Features\n\n* **changelog:**\n  * add changelog to README ([0c70f8d2](https://github.com/salsita/grunt-userev/commit/0c70f8d2569534215575dfef037936018d26a70e))\n  * add changelog ([3617bb0a](https://github.com/salsita/grunt-userev/commit/3617bb0af7bb733857cc3fdf391bb20a92631df7))\n\n<a name=\"v0.0.1\"></a>\n### v0.0.1 (2013-11-21)\n\n\n#### Features\n\n* **task:** create grunt userev task ([d9f515c4](https://github.com/salsita/grunt-userev/commit/d9f515c4b74c980231f006dfdaaf4727ccd42aae))\n\r\n\n## License\n\nCopyright 2013 [Salsita Software](http://salsitasoft.com). Licensed under the [MIT License](http://en.wikipedia.org/wiki/MIT_License).\n","engines":{"node":">= 0.8.0"},"scripts":{"test":"grunt test"},"_npmUser":{"name":"salsita","email":"matthew@salsitasoft.com"},"licenses":[{"type":"MIT"}],"repository":{"url":"https://github.com/salsita/grunt-userev","type":"git"},"_npmVersion":"1.3.11","description":"Update references to assets versioned with grunt-filerev. Leaner and faster than grunt-usemin, and able to update already versioned references.","directories":{},"readmeFilename":"README.md","devDependencies":{"grunt":"~0.4.0rc2","jshint-stylish":"~0.1.3","load-grunt-tasks":"~0.2.0","grunt-contrib-clean":"~0.5.0","grunt-contrib-watch":"~0.5.3","grunt-contrib-concat":"~0.3.0","grunt-contrib-jshint":"~0.7.2","grunt-contrib-nodeunit":"~0.2.2","grunt-conventional-changelog":"~1.0.0"}},"0.0.4":{"name":"grunt-userev","version":"0.0.4","keywords":["gruntplugin"],"author":{"url":"http://www.salsitasoft.com/","name":"Salsita Software"},"_id":"grunt-userev@0.0.4","maintainers":[{"name":"salsita","email":"matthew@salsitasoft.com"}],"homepage":"https://github.com/salsita/grunt-userev","bugs":{"url":"https://github.com/salsita/grunt-userev/issues"},"dist":{"shasum":"901b86848b41480344e4d492109792aa370cda76","tarball":"https://registry.npmjs.org/grunt-userev/-/grunt-userev-0.0.4.tgz","integrity":"sha512-rhDq5ce/PnkiW7MefOv3guWmveMhPgOyplsBxky5RSAGgJnXa02kTLo+X7TGgH5Uaa8goAodKwpv7khVNPQqsw==","signatures":[{"sig":"MEUCIEqeQfF80iH1C0ov4HoNOERlOPQBug0O0a9jozab/IXhAiEAlsmKv5zKQUcmUD7b1F86No5XemhA7aZoz0qpItc1CHE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"Gruntfile.js","_from":".","readme":"# grunt-userev <a href='https://github.com/salsita'><img align='right' title='Salsita' src='https://www.google.com/a/cpanel/salsitasoft.com/images/logo.gif?alpha=1' _src='https://1.gravatar.com/avatar/d413290a5fe1385efcf5a344d4a0b588?s=50' /></a>\n\n> Update references to assets versioned with [grunt-filerev](https://github.com/yeoman/grunt-filerev). Leaner and faster than [grunt-usemin](https://github.com/yeoman/grunt-usemin), and able to update already versioned references.\n\n<a href='https://npmjs.org/package/grunt-userev'><img align='left' alt='npm' title='npm info' src='https://nodei.co/npm/grunt-userev.png?compact=true' /></a>\n\n&nbsp;[![build](https://secure.travis-ci.org/salsita/grunt-userev.png?branch=master)](https://travis-ci.org/salsita/grunt-userev) &nbsp;[![npm version](https://badge.fury.io/js/grunt-userev.png)](https://npmjs.org/package/grunt-userev) &nbsp;[![dependencies](https://david-dm.org/salsita/grunt-userev.png)](https://david-dm.org/salsita/grunt-userev) &nbsp;[![dev-dependencies](https://david-dm.org/salsita/grunt-userev/dev-status.png)](https://david-dm.org/salsita/grunt-userev#info=devDependencies)\n\r\n\n## Getting Started\n\nThis plugin requires [Grunt](http://gruntjs.com).\n\nIf you haven't used Grunt 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:\n\n```shell\nnpm install grunt-userev --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-userev');\n```\n\r\n\n## The \"userev\" task\n\n### Overview\n\nIn your project's Gruntfile, configure `userev` to update references to assets versioned by [grunt-filerev](https://github.com/yeoman/grunt-filerev). It will automatically use [`grunt.filerev.summary`](https://github.com/yeoman/grunt-filerev#summary).\n\n\n```js\ngrunt.initConfig({\n  filerev: {\n    options: {\n      encoding: 'utf8',\n      algorithm: 'md5',\n      length: 8\n    },\n    sourcemaps: {        // Rename sourcemaps.\n      src: ['build/css/*.map.css', 'build/js/*.map.js'],\n    },\n    assets: {            // Rename minified js/css.\n      src: ['build/css/*.css', 'build/js/*.js', '!build/css/*.map.css', '!build/js/*.map.js'],\n    },\n  },\n\n  userev: {\n    options: {\n      hash: /(\\.[a-f0-9]{8})\\.[a-z]+$/,\n    },\n    assets: {            // Link to sourcemaps in minified js/css.\n      src: ['build/css/*.css', 'build/js/*.js', '!build/css/*.map.css', '!build/js/*.map.js'],\n      options: {\n        patterns: {\n          'Linking versioned source maps': /sourceMappingURL=([a-z0-9.]*\\.map)/,\n        },\n      },\n    },\n    index: {             // Link to minified js/css in index html.\n      src: 'build/index.html',\n      options: {\n        patterns: {\n          'Linking versioned assets': /(css\\/[a-z0-9.]*\\.css)/,\n        },\n      },\n    },\n  },\n});\n\ngrunt.registerTask( 'rev', [\n  'filerev:sourcemaps',  // Rename sourcemaps.\n  'userev:assets',       // Link to sourcemaps in minified js/css.\n  'filerev:assets',      // Rename minified js/css.\n  'userev:index',        // Link to minified js/css in index html.\n]);\n\n```\n\r\n\n### Options\n\n#### patterns\nType: `Object {Key: RegExp}`\nDefault: none\n\nReference RegExp patterns are matched in source files. The first matched group is checked if it matches ending of any key in [`grunt.filerev.summary`](https://github.com/yeoman/grunt-filerev#summary). The key names are used to log processing of matched patterns.\n\n#### hash\nType: `RegExp`\nDefault: none\n\nIf specified, the RegExp pattern is matched against matched references and the first matched group (the hash in filename) is removed. This allows to update the references in source files multiple times without need to regenerate them.\n\r\n\n## Contributing\n\nWelcome to the project. Choose a way that suits you. You'll need a [GitHub account](https://github.com/signup/free).\n\n### Submit a bug, or feature request\n\n* Search [existing issues](https://github.com/salsita/grunt-userev/issues) to avoid duplicities.\n* [Submit an issue](https://github.com/salsita/grunt-userev/issues/new) with label `bug`, or `enhancement`.\n* For a bug, include any relevant information, e.g. task output, installed OS/Node.js/Grunt/grunt-userev versions, and steps to reproduce.\n\n### Submit a pull request\n\n* [Fork the repository](https://github.com/salsita/grunt-userev/fork) ([help](https://help.github.com/articles/fork-a-repo)) and checkout new branch prefixed with either `feature-`, or `fix-`, or `docs-`, or `chore-`.\n* [Use](https://github.com/salsita/grunt-userev/blob/master/.jshintrc) the [popular JavaScript style convention](http://sideeffect.kr/popularconvention#javascript) and [winning JavaScript style](http://seravo.fi/2013/javascript-the-winning-style) with exception of 100 characters per line. In short, use 2 spaces indent, camelCase names, trailing comma, single quotes, semicolons, sparse spacing, and no trailing whitespace.\n* For a bugfix, write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix.\n* For a new feature, add tests that cover the feature.\n* Lint and test your code by running `grunt`, or `grunt watch` to watch source files and run tests on any change.\n* Use commit messages suitable for generating [changelog](#changelog) and following [Karma/Angular commit message convention](https://github.com/karma-runner/karma/blob/master/docs/dev/04-git-commit-msg.md) ([docs](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#)). In short, use `<type>(<scope>): <subject>` header in imperative present tense, message body describing motivation/differences, and footer referencing related issues and breaking changes.\n* [Create a pull request](https://github.com/salsita/grunt-userev/compare) ([help](https://help.github.com/articles/creating-a-pull-request)) to [grunt-userev](https://github.com/salsita/grunt-userev) [master](https://github.com/salsita/grunt-userev/branches) branch.\n\r\n\n## Roadmap\n\n- Add tests\n\n\n<a name=\"changelog\"></a>\n## Changelog\n\r\n<a name=\"v0.0.2\"></a>\n### v0.0.2 (2013-11-21)\n\n\n#### Features\n\n* **changelog:**\n  * add changelog to README ([0c70f8d2](https://github.com/salsita/grunt-userev/commit/0c70f8d2569534215575dfef037936018d26a70e))\n  * add changelog ([3617bb0a](https://github.com/salsita/grunt-userev/commit/3617bb0af7bb733857cc3fdf391bb20a92631df7))\n\n<a name=\"v0.0.1\"></a>\n### v0.0.1 (2013-11-21)\n\n\n#### Features\n\n* **task:** create grunt userev task ([d9f515c4](https://github.com/salsita/grunt-userev/commit/d9f515c4b74c980231f006dfdaaf4727ccd42aae))\n\r\n\n## License\n\nCopyright 2013 [Salsita Software](http://salsitasoft.com). Licensed under the [MIT License](http://en.wikipedia.org/wiki/MIT_License).\n","engines":{"node":">= 0.8.0"},"scripts":{"test":"grunt test"},"_npmUser":{"name":"salsita","email":"matthew@salsitasoft.com"},"licenses":[{"type":"MIT"}],"repository":{"url":"https://github.com/salsita/grunt-userev","type":"git"},"_npmVersion":"1.3.11","description":"Update references to assets versioned with grunt-filerev. Leaner and faster than grunt-usemin, and able to update already versioned references.","directories":{},"readmeFilename":"README.md","devDependencies":{"grunt":"~0.4.0rc2","jshint-stylish":"~0.1.3","load-grunt-tasks":"~0.2.0","grunt-contrib-clean":"~0.5.0","grunt-contrib-watch":"~0.5.3","grunt-contrib-concat":"~0.3.0","grunt-contrib-jshint":"~0.7.2","grunt-contrib-nodeunit":"~0.2.2","grunt-conventional-changelog":"~1.0.0"}},"0.0.5":{"name":"grunt-userev","version":"0.0.5","keywords":["gruntplugin"],"author":{"url":"http://www.salsitasoft.com/","name":"Salsita Software"},"_id":"grunt-userev@0.0.5","maintainers":[{"name":"salsita","email":"matthew@salsitasoft.com"}],"homepage":"https://github.com/salsita/grunt-userev","bugs":{"url":"https://github.com/salsita/grunt-userev/issues"},"dist":{"shasum":"cd44f8e92babaa8728802c154c17ef22564108f5","tarball":"https://registry.npmjs.org/grunt-userev/-/grunt-userev-0.0.5.tgz","integrity":"sha512-SIpLCSWlHAvKWlLXNMXs+VExvtqPBt0VHK/42C+q9J4eAwzNSkfq8shW2NTg3H5B5A7Sl3FFt0HwHcwLr0NJIg==","signatures":[{"sig":"MEUCIQCJauEwVztXFbLZHtwu5DK7tHcpE95Xx3YapEo8NSBKcAIgQdZ48Pwyw74VDlh2GaxcicsIH+h/Ys1/4hMYj1NzsDs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"Gruntfile.js","_from":".","readme":"# grunt-userev <a href='https://github.com/salsita'><img align='right' title='Salsita' src='https://www.google.com/a/cpanel/salsitasoft.com/images/logo.gif?alpha=1' _src='https://1.gravatar.com/avatar/d413290a5fe1385efcf5a344d4a0b588?s=50' /></a>\n\n> Update references to assets versioned with [grunt-filerev](https://github.com/yeoman/grunt-filerev). Leaner and faster than [grunt-usemin](https://github.com/yeoman/grunt-usemin), and able to update already versioned references.\n\n<a href='https://npmjs.org/package/grunt-userev'><img align='right' alt='npm' title='npm info' src='https://nodei.co/npm/grunt-userev.png?compact=true' /></a>&nbsp;[![build](https://secure.travis-ci.org/salsita/grunt-userev.png?branch=master)](https://travis-ci.org/salsita/grunt-userev) [![dependencies](https://david-dm.org/salsita/grunt-userev.png)](https://david-dm.org/salsita/grunt-userev) [![dev-dependencies](https://david-dm.org/salsita/grunt-userev/dev-status.png)](https://david-dm.org/salsita/grunt-userev#info=devDependencies)\n\n\r\n\n## Getting Started\n\nThis plugin requires [Grunt](http://gruntjs.com).\n\nIf you haven't used Grunt 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:\n\n```shell\nnpm install grunt-userev --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-userev');\n```\n\r\n\n## The \"userev\" task\n\n### Overview\n\nIn your project's Gruntfile, configure `userev` to update references to assets versioned by [grunt-filerev](https://github.com/yeoman/grunt-filerev). It will automatically use [`grunt.filerev.summary`](https://github.com/yeoman/grunt-filerev#summary).\n\n\n```js\ngrunt.initConfig({\n  filerev: {\n    options: {\n      encoding: 'utf8',\n      algorithm: 'md5',\n      length: 8\n    },\n    sourcemaps: {        // Rename sourcemaps.\n      src: ['build/css/*.map.css', 'build/js/*.map.js'],\n    },\n    assets: {            // Rename minified js/css.\n      src: ['build/css/*.css', 'build/js/*.js', '!build/css/*.map.css', '!build/js/*.map.js'],\n    },\n  },\n\n  userev: {\n    options: {\n      hash: /(\\.[a-f0-9]{8})\\.[a-z]+$/,\n    },\n    assets: {            // Link to sourcemaps in minified js/css.\n      src: ['build/css/*.css', 'build/js/*.js', '!build/css/*.map.css', '!build/js/*.map.js'],\n      options: {\n        patterns: {\n          'Linking versioned source maps': /sourceMappingURL=([a-z0-9.]*\\.map)/,\n        },\n      },\n    },\n    index: {             // Link to minified js/css in index html.\n      src: 'build/index.html',\n      options: {\n        patterns: {\n          'Linking versioned assets': /(css\\/[a-z0-9.]*\\.css)/,\n        },\n      },\n    },\n  },\n});\n\ngrunt.registerTask( 'rev', [\n  'filerev:sourcemaps',  // Rename sourcemaps.\n  'userev:assets',       // Link to sourcemaps in minified js/css.\n  'filerev:assets',      // Rename minified js/css.\n  'userev:index',        // Link to minified js/css in index html.\n]);\n\n```\n\r\n\n### Options\n\n#### patterns\nType: `Object {Key: RegExp}`\nDefault: none\n\nReference RegExp patterns are matched in source files. The first matched group is checked if it matches ending of any key in [`grunt.filerev.summary`](https://github.com/yeoman/grunt-filerev#summary). The key names are used to log processing of matched patterns.\n\n#### hash\nType: `RegExp`\nDefault: none\n\nIf specified, the RegExp pattern is matched against matched references and the first matched group (the hash in filename) is removed. This allows to update the references in source files multiple times without need to regenerate them.\n\r\n\n## Contributing\n\nWelcome to the project. Choose a way that suits you. You'll need a [GitHub account](https://github.com/signup/free).\n\n### Submit a bug, or feature request\n\n* Search [existing issues](https://github.com/salsita/grunt-userev/issues) to avoid duplicities.\n* [Submit an issue](https://github.com/salsita/grunt-userev/issues/new) with label `bug`, or `enhancement`.\n* For a bug, include any relevant information, e.g. task output, installed OS/Node.js/Grunt/grunt-userev versions, and steps to reproduce.\n\n### Submit a pull request\n\n* [Fork the repository](https://github.com/salsita/grunt-userev/fork) ([help](https://help.github.com/articles/fork-a-repo)) and checkout new branch with `<type>-` prefix in name, where type may be feature, fix, docs, or chore.\n* [Use](https://github.com/salsita/grunt-userev/blob/master/.jshintrc) the [popular JavaScript style convention](http://sideeffect.kr/popularconvention#javascript) and [winning JavaScript style](http://seravo.fi/2013/javascript-the-winning-style) with exception of 100 characters per line. In short, use 2 spaces indent, camelCase names, trailing comma, single quotes, semicolons, sparse spacing, and no trailing whitespace.\n* For bugfix, write a test that exposes the bug and fails without the fix. Submit the test alongside.\n* For a new feature, add tests that cover the feature.\n* Lint and test your code with `grunt`, or `grunt watch` to watch sources and run tests on any change.\n* Use commit messages that follow [Karma/Angular commit message convention](https://github.com/karma-runner/karma/blob/master/docs/dev/04-git-commit-msg.md) ([docs](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#)). In short, use `<type>(<scope>): <subject>` header in imperative present tense, message body describing motivation/differences, and footer referencing related issues and breaking changes.\n* [Create a pull request](https://github.com/salsita/grunt-userev/compare) to [grunt-userev](https://github.com/salsita/grunt-userev) [master](https://github.com/salsita/grunt-userev/branches) branch ([help](https://help.github.com/articles/creating-a-pull-request)).\n\r\n\n## Roadmap\n\n- Add tests\n\n\n<a name=\"changelog\"></a>\n## Changelog\n\r\n<a name=\"v0.0.2\"></a>\n### v0.0.2 (2013-11-21)\n\n\n#### Features\n\n* **changelog:**\n  * add changelog to README ([0c70f8d2](https://github.com/salsita/grunt-userev/commit/0c70f8d2569534215575dfef037936018d26a70e))\n  * add changelog ([3617bb0a](https://github.com/salsita/grunt-userev/commit/3617bb0af7bb733857cc3fdf391bb20a92631df7))\n\n<a name=\"v0.0.1\"></a>\n### v0.0.1 (2013-11-21)\n\n\n#### Features\n\n* **task:** create grunt userev task ([d9f515c4](https://github.com/salsita/grunt-userev/commit/d9f515c4b74c980231f006dfdaaf4727ccd42aae))\n\r\n\n## License\n\nCopyright 2013 [Salsita Software](http://salsitasoft.com). Licensed under the [MIT License](http://en.wikipedia.org/wiki/MIT_License).\n","engines":{"node":">= 0.8.0"},"scripts":{"test":"grunt test"},"_npmUser":{"name":"salsita","email":"matthew@salsitasoft.com"},"licenses":[{"type":"MIT"}],"repository":{"url":"https://github.com/salsita/grunt-userev","type":"git"},"_npmVersion":"1.3.11","description":"Update references to assets versioned with grunt-filerev. Leaner and faster than grunt-usemin, and able to update already versioned references.","directories":{},"readmeFilename":"README.md","devDependencies":{"grunt":"~0.4.0rc2","jshint-stylish":"~0.1.3","load-grunt-tasks":"~0.2.0","grunt-contrib-clean":"~0.5.0","grunt-contrib-watch":"~0.5.3","grunt-contrib-concat":"~0.3.0","grunt-contrib-jshint":"~0.7.2","grunt-contrib-nodeunit":"~0.2.2","grunt-conventional-changelog":"~1.0.0"}},"0.0.6":{"name":"grunt-userev","version":"0.0.6","keywords":["gruntplugin","optimize","minify","rev","version","versioning","html","css","assets"],"author":{"url":"https://github.com/salsita","name":"Salsita Software"},"_id":"grunt-userev@0.0.6","maintainers":[{"name":"salsita","email":"matthew@salsitasoft.com"}],"homepage":"https://github.com/salsita/grunt-userev","bugs":{"url":"https://github.com/salsita/grunt-userev/issues"},"dist":{"shasum":"b29aec3c186587b918363c02a241d6ec25e42a81","tarball":"https://registry.npmjs.org/grunt-userev/-/grunt-userev-0.0.6.tgz","integrity":"sha512-LhsBo34c5OOeVFkDU8XXFkAn2pOy1n4vVXM2nzRZphmEYxHS2D7gtMll+5Fq2pteebtVH16C3Hko1U3j6W2RCQ==","signatures":[{"sig":"MEYCIQDSBjtgyPBwzSuYwwA1uBCPkigEO7Mh7OvRPDRkiQ/EdQIhAPLNphdNvDAHLA8YPiV8VxPaRllkOKxGZ8UwK5uAVI7w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"Gruntfile.js","_from":".","readme":"# grunt-userev <a href='https://github.com/salsita'><img align='right' title='Salsita' src='https://www.google.com/a/cpanel/salsitasoft.com/images/logo.gif?alpha=1' _src='https://1.gravatar.com/avatar/d413290a5fe1385efcf5a344d4a0b588?s=50' /></a>\n\n> Update references to assets versioned with [grunt-filerev](https://github.com/yeoman/grunt-filerev). Leaner and faster than [grunt-usemin](https://github.com/yeoman/grunt-usemin), and able to update already versioned references.\n\n<a href='https://npmjs.org/package/grunt-userev'><img align='right' alt='npm' title='npm info' src='https://nodei.co/npm/grunt-userev.png?compact=true' /></a>&nbsp;[![build](https://secure.travis-ci.org/salsita/grunt-userev.png?branch=master)](https://travis-ci.org/salsita/grunt-userev) [![dependencies](https://david-dm.org/salsita/grunt-userev.png)](https://david-dm.org/salsita/grunt-userev) [![dev-dependencies](https://david-dm.org/salsita/grunt-userev/dev-status.png)](https://david-dm.org/salsita/grunt-userev#info=devDependencies)\n\n\r\n\n## Getting Started\n\nThis plugin requires [Grunt](http://gruntjs.com).\n\nIf you haven't used Grunt 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:\n\n```shell\nnpm install grunt-userev --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-userev');\n```\n\r\n\n## The \"userev\" task\n\n### Overview\n\nIn your project's Gruntfile, configure `userev` to update references to assets versioned by [grunt-filerev](https://github.com/yeoman/grunt-filerev). It will automatically use [`grunt.filerev.summary`](https://github.com/yeoman/grunt-filerev#summary).\n\n\n```js\ngrunt.initConfig({\n  filerev: {\n    options: {\n      encoding: 'utf8',\n      algorithm: 'md5',\n      length: 8\n    },\n    sourcemaps: {        // Rename sourcemaps.\n      src: ['build/css/*.map.css', 'build/js/*.map.js'],\n    },\n    assets: {            // Rename minified js/css.\n      src: ['build/css/*.css', 'build/js/*.js', '!build/css/*.map.css', '!build/js/*.map.js'],\n    },\n  },\n\n  userev: {\n    options: {\n      hash: /(\\.[a-f0-9]{8})\\.[a-z]+$/,\n    },\n    assets: {            // Link to sourcemaps in minified js/css.\n      src: ['build/css/*.css', 'build/js/*.js', '!build/css/*.map.css', '!build/js/*.map.js'],\n      options: {\n        patterns: {\n          'Linking versioned source maps': /sourceMappingURL=([a-z0-9.]*\\.map)/,\n        },\n      },\n    },\n    index: {             // Link to minified js/css in index html.\n      src: 'build/index.html',\n      options: {\n        patterns: {\n          'Linking versioned assets': /(css\\/[a-z0-9.]*\\.css)/,\n        },\n      },\n    },\n  },\n});\n\ngrunt.registerTask( 'rev', [\n  'filerev:sourcemaps',  // Rename sourcemaps.\n  'userev:assets',       // Link to sourcemaps in minified js/css.\n  'filerev:assets',      // Rename minified js/css.\n  'userev:index',        // Link to minified js/css in index html.\n]);\n\n```\n\r\n\n### Options\n\n#### patterns\nType: `Object {Key: RegExp}`\nDefault: none\n\nReference RegExp patterns are matched in source files. The first matched group is checked if it matches ending of any key in [`grunt.filerev.summary`](https://github.com/yeoman/grunt-filerev#summary). The key names are used to log processing of matched patterns.\n\n#### hash\nType: `RegExp`\nDefault: none\n\nIf specified, the RegExp pattern is matched against matched references and the first matched group (the hash in filename) is removed. This allows to update the references in source files multiple times without need to regenerate them.\n\r\n\n## Contributing\n\nWelcome to the project. Choose a way that suits you. You'll need a [GitHub account](https://github.com/signup/free).\n\n### Submit a bug, or feature request\n\n- Search [existing issues](https://github.com/salsita/grunt-userev/issues) to avoid duplicities.\n- [Submit an issue](https://github.com/salsita/grunt-userev/issues/new) with label `bug`, or `enhancement`.\n- For a bug, include any relevant information, e.g. task output, installed OS/Node.js/Grunt/grunt-userev versions, and steps to reproduce.\n\n### Submit a pull request\n\n- [Fork the repository](https://github.com/salsita/grunt-userev/fork) ([help](https://help.github.com/articles/fork-a-repo)) and checkout new branch with `<type>-` prefix in name, where type may be feature, fix, docs, or chore.\n- [Use](https://github.com/salsita/grunt-userev/blob/master/.jshintrc) the [popular JavaScript style convention](http://sideeffect.kr/popularconvention#javascript) and [winning JavaScript style](http://seravo.fi/2013/javascript-the-winning-style) with exception of 100 characters per line. In short, use 2 spaces indent, camelCase names, trailing comma, single quotes, semicolons, sparse spacing, and no trailing whitespace.\n- For bugfix, write a test that exposes the bug and fails without the fix. Submit the test alongside.\n- For a new feature, add tests that cover the feature.\n- Lint and test your code with `grunt`, or `grunt watch` to watch sources and run tests on any change.\n- Use commit messages that follow [Karma/Angular commit message convention](https://github.com/karma-runner/karma/blob/master/docs/dev/04-git-commit-msg.md) ([docs](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#)). In short, use `<type>(<scope>): <subject>` header in imperative present tense, message body describing motivation/differences, and footer referencing related issues and breaking changes.\n- [Create a pull request](https://github.com/salsita/grunt-userev/compare) to [grunt-userev](https://github.com/salsita/grunt-userev) [master](https://github.com/salsita/grunt-userev/branches) branch ([help](https://help.github.com/articles/creating-a-pull-request)).\n\r\n\n## Roadmap\n\n- Add tests\n\n\n<a name=\"changelog\"></a>\n## Changelog\n\r\n<a name=\"v0.0.2\"></a>\n### v0.0.2 (2013-11-21)\n\n\n#### Features\n\n* **changelog:**\n  * add changelog to README ([0c70f8d2](https://github.com/salsita/grunt-userev/commit/0c70f8d2569534215575dfef037936018d26a70e))\n  * add changelog ([3617bb0a](https://github.com/salsita/grunt-userev/commit/3617bb0af7bb733857cc3fdf391bb20a92631df7))\n\n<a name=\"v0.0.1\"></a>\n### v0.0.1 (2013-11-21)\n\n\n#### Features\n\n* **task:** create grunt userev task ([d9f515c4](https://github.com/salsita/grunt-userev/commit/d9f515c4b74c980231f006dfdaaf4727ccd42aae))\n\r\n\n## License\n\nCopyright 2013 [Salsita Software](http://salsitasoft.com). Licensed under the [MIT License](http://en.wikipedia.org/wiki/MIT_License).\n","engines":{"node":">= 0.8.0"},"scripts":{"test":"grunt test"},"_npmUser":{"name":"salsita","email":"matthew@salsitasoft.com"},"licenses":[{"type":"MIT"}],"repository":{"url":"git://github.com/salsita/grunt-userev.git","type":"git"},"_npmVersion":"1.3.11","description":"Update references to assets versioned with grunt-filerev. Leaner and faster than grunt-usemin, and able to update already versioned references.","directories":{},"readmeFilename":"README.md","devDependencies":{"grunt":"~0.4.0rc2","jshint-stylish":"~0.1.3","load-grunt-tasks":"~0.2.0","grunt-contrib-clean":"~0.5.0","grunt-contrib-watch":"~0.5.3","grunt-contrib-concat":"~0.3.0","grunt-contrib-jshint":"~0.7.2","grunt-contrib-nodeunit":"~0.2.2","grunt-conventional-changelog":"~1.0.0"}}},"time":{"created":"2013-11-21T06:34:29.320Z","modified":"2026-09-05T16:54:21.594Z","0.0.1":"2013-11-21T06:34:34.800Z","0.0.2":"2013-11-21T08:13:55.246Z","0.0.3":"2013-11-21T08:26:09.836Z","0.0.4":"2013-11-21T08:27:43.763Z","0.0.5":"2013-11-21T10:08:28.972Z","0.0.6":"2013-11-22T16:11:13.345Z"},"author":{"url":"https://github.com/salsita","name":"Salsita Software"},"repository":{"url":"git://github.com/salsita/grunt-userev.git","type":"git"},"description":"Update references to assets versioned with grunt-filerev. Leaner and faster than grunt-usemin, and able to update already versioned references.","keywords":["gruntplugin","optimize","minify","rev","version","versioning","html","css","assets"],"homepage":"https://github.com/salsita/grunt-userev","bugs":{"url":"https://github.com/salsita/grunt-userev/issues"},"maintainers":[{"email":"goce@goce.cz","name":"goce"}],"readme":"# grunt-userev <a href='https://github.com/salsita'><img align='right' title='Salsita' src='https://www.google.com/a/cpanel/salsitasoft.com/images/logo.gif?alpha=1' _src='https://1.gravatar.com/avatar/d413290a5fe1385efcf5a344d4a0b588?s=50' /></a>\n\n<a href='https://npmjs.org/package/grunt-userev'><img align='right' alt='npm' title='npm info' src='https://nodei.co/npm/grunt-userev.png?compact=true' /></a>\n\n> Update references to assets versioned with [grunt-filerev](https://github.com/yeoman/grunt-filerev). Leaner and faster than [grunt-usemin](https://github.com/yeoman/grunt-usemin), and able to update already versioned references.\n\n[![build](https://secure.travis-ci.org/salsita/grunt-userev.png?branch=master)](https://travis-ci.org/salsita/grunt-userev) [![npm version](https://badge.fury.io/js/grunt-userev.png)](https://npmjs.org/package/grunt-userev) [![dependencies](https://david-dm.org/salsita/grunt-userev.png)](https://david-dm.org/salsita/grunt-userev) [![dev-dependencies](https://david-dm.org/salsita/grunt-userev/dev-status.png)](https://david-dm.org/salsita/grunt-userev#info=devDependencies)\n\n## Getting Started\n\nThis plugin requires [Grunt](http://gruntjs.com).\n\nIf you haven't used Grunt 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:\n\n```shell\nnpm install grunt-userev --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-userev');\n```\n\n\n## The \"userev\" task\n\n### Overview\n\nIn your project's Gruntfile, configure `userev` to update references to assets versioned by [grunt-filerev](https://github.com/yeoman/grunt-filerev). It will automatically use [`grunt.filerev.summary`](https://github.com/yeoman/grunt-filerev#summary).\n\n\n```js\ngrunt.initConfig({\n  filerev: {\n    options: {\n      encoding: 'utf8',\n      algorithm: 'md5',\n      length: 8\n    },\n    sourcemaps: {        // Rename sourcemaps.\n      src: ['build/css/*.map.css', 'build/js/*.map.js'],\n    },\n    assets: {            // Rename minified js/css.\n      src: ['build/css/*.css', 'build/js/*.js', '!build/css/*.map.css', '!build/js/*.map.js'],\n    },\n  },\n\n  userev: {\n    options: {\n      hash: /(\\.[a-f0-9]{8})\\.[a-z]+$/,\n    },\n    assets: {            // Link to sourcemaps in minified js/css.\n      src: ['build/css/*.css', 'build/js/*.js', '!build/css/*.map.css', '!build/js/*.map.js'],\n      options: {\n        patterns: {\n          'Linking versioned source maps': /sourceMappingURL=([a-z0-9.]*\\.map)/,\n        },\n      },\n    },\n    index: {             // Link to minified js/css in index html.\n      src: 'build/index.html',\n      options: {\n        patterns: {\n          'Linking versioned assets': /(css\\/[a-z0-9.]*\\.css)/,\n        },\n      },\n    },\n  },\n});\n\ngrunt.registerTask( 'rev', [\n  'filerev:sourcemaps',  // Rename sourcemaps.\n  'userev:assets',       // Link to sourcemaps in minified js/css.\n  'filerev:assets',      // Rename minified js/css.\n  'userev:index',        // Link to minified js/css in index html.\n]);\n\n```\n\n\n### Options\n\n#### patterns\nType: `Object {Key: RegExp}`\nDefault: none\n\nReference RegExp patterns are matched in source files. The first matched group is checked if it matches ending of any key in [`grunt.filerev.summary`](https://github.com/yeoman/grunt-filerev#summary). The key names are used to log processing of matched patterns.\n\n#### hash\nType: `RegExp`\nDefault: none\n\nIf specified, the RegExp pattern is matched against matched references and the first matched group (the hash in filename) is removed. This allows to update the references in source files multiple times without need to regenerate them.\n\n\n## Roadmap\n\n- Add changelog\n- Extend tests\n\n\n## Contributing\n\nWelcome to the project. Choose a way that suits you. You'll need a [GitHub account](https://github.com/signup/free).\n\n### Submit a bug, or feature request\n\n* Search [existing issues](https://github.com/salsita/grunt-userev/issues) to avoid duplicities.\n* [Submit an issue](https://github.com/salsita/grunt-userev/issues/new) with label `bug`, or `enhancement`.\n* For a bug, include any relevant information, e.g. task output, installed OS/Node.js/Grunt/grunt-userev versions, and steps to reproduce.\n\n### Submit a pull request\n\n* [Fork the repository](https://github.com/salsita/grunt-userev/fork) ([help](https://help.github.com/articles/fork-a-repo)) and checkout new branch prefixed with either `feature-`, or `fix-`, or `docs-`, or `chore-`.\n* [Use](https://github.com/salsita/grunt-userev/blob/master/.jshintrc) the [popular JavaScript style convention](http://sideeffect.kr/popularconvention#javascript) and [winning JavaScript style](http://seravo.fi/2013/javascript-the-winning-style) with exception of 100 characters per line. In short, use 2 spaces indent, camelCase names, trailing comma, single quotes, semicolons, sparse spacing, and no trailing whitespace.\n* For a bugfix, write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix.\n* For a new feature, add tests that cover the feature.\n* Lint and test your code by running `grunt`, or `grunt watch` to watch source files and run tests on any change.\n* Use commit messages suitable for generating [changelog](https://github.com/salsita/grunt-userev/blob/master/CHANGELOG.md) and following [Karma/Angular commit message convention](https://github.com/karma-runner/karma/blob/master/docs/dev/04-git-commit-msg.md) ([docs](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#)). In short, use `<type>(<scope>): <subject>` header in imperative present tense, message body describing motivation/differences, and footer referencing related issues and breaking changes.\n* [Create a pull request](https://github.com/salsita/grunt-userev/compare) ([help](https://help.github.com/articles/creating-a-pull-request)) to [grunt-userev](https://github.com/salsita/grunt-userev) [master](https://github.com/salsita/grunt-userev/branches) branch.\n\n\n## License\n\nCopyright 2013 [Salsita Software](http://salsitasoft.com). Licensed under the [MIT License](http://en.wikipedia.org/wiki/MIT_License).\n"}