{"_id":"@drugscom/grunt-assets-versioning","_rev":"8-c41e9a62ec43e44ade491a8115d308d6","name":"@drugscom/grunt-assets-versioning","dist-tags":{"latest":"1.0.12"},"versions":{"1.0.10":{"name":"@drugscom/grunt-assets-versioning","description":"Versioning static assets with Grunt","version":"1.0.10","homepage":"https://github.com/drugscom/grunt-assets-versioning","author":{"name":"Peter Simmons","email":"peter.simmons@drugs.com"},"repository":{"type":"git","url":"git://github.com/drugscom/grunt-assets-versioning.git"},"bugs":{"url":"https://github.com/drugscom/grunt-assets-versioning/issues"},"licenses":[{"type":"MIT","url":"https://github.com/drugscom/grunt-assets-versioning/blob/master/LICENSE-MIT"}],"main":"Gruntfile.js","engines":{"node":">= 6"},"scripts":{"test":"grunt test"},"license":"MIT","devDependencies":{"debug":"^4.1.1","grunt":"~1.0.3","grunt-contrib-clean":"~2.0.0","grunt-contrib-concat":"~1.0.1","grunt-contrib-jshint":"~2.0.0","grunt-contrib-nodeunit":"~2.0.0","grunt-jsdoc":"^2.3.0","lodash":"^4.17.11","mock-fs":"^4.8.0"},"peerDependencies":{"grunt":">=1"},"keywords":["gruntplugin"],"dependencies":{"moment":"^2.24.0","slash":"^2.0.0"},"directories":{"test":"test"},"gitHead":"c8a68b3ce5487652e1686a211ce6fbaf6e7db30e","_id":"@drugscom/grunt-assets-versioning@1.0.10","_nodeVersion":"8.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-TgNAHWe1JVuoDUD+4PVHDlRbr12KT9In0uzf7dvIs0cYwnOTm/ASXjeuvzIEyihjSx00x3xkhg9DVPlyJuHJzg==","shasum":"13166020898f8faaa65c787132785efb2d44c293","tarball":"https://registry.npmjs.org/@drugscom/grunt-assets-versioning/-/grunt-assets-versioning-1.0.10.tgz","fileCount":18,"unpackedSize":48333,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchwFvCRA9TVsSAnZWagAAYXMP/jZ/LGauDVVldS0rEbpr\nWwpVWAJ0q3vftGMxDTjY/C4RCwCanZEBalLNsIU1pDbmbSjjBTwz4gkAMWnf\nrDECopHTLp4R5Rw/dlViIKJLzMXOozAv6jXSelIMJqTHwulZGzxahQ8wmRM1\n4cn7SqVscsyK6upYS1RhUpopOpSCvWl+PiuyhviNg8fkOSzVuLE8Hk248C2k\n5Bxhj+fYBWksEdjL51CHL/EAN306qkUxZYKryXvducTwqB/H10eFcGkLo3dx\n3gSU00AGVx76yW/VfvW8E5XviHvQnvPeRSvTLJcD20VHgfU7hfJhj/2IV+TP\nPqy7tGb/K//K6ZgoQtwQy7AIemeujgcj2rIJMiEF1wsz6g3gck85CeeH3Cas\nkturtotPhFm/zpNoDY5d7dFmsaQpQAvaPQM3L4zdrCBhtF8DcczQyolTtVzC\nSAmJ5+P/oPfMidJvWReHk4dDah8InaeKFF5WUQ4fgjs2Bk64Pwd4c2rke1pW\n70Zq+S2VozXPS4iAml7k/jR0tyUZW4AX8skeXPCsTEW6tNdm24g0TGWyucTK\nWGY15NkyWeP+SqpbCj3NOQ4gQvvjcO20jv+k0/iIADvlrK+xqvYo+EGPWMeD\npYNMgFMnlRJnaiMzwW/per4zP+xRr4n4YsnKnZWPtqaMgGUIdNgWCpgVumcl\n+3ij\r\n=8S5t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfTsnoYJhOIzjvU02XSmFgTy+VCo9zW0X55VP8cNoXHQIgAOhAIIamfHgA/kWyJobHdPjsglmjckSUn0qK8datM+A="}]},"maintainers":[{"name":"noodlesnz","email":"nick@noodles.net.nz"},{"name":"cabbiepete","email":"cabbiepete@gmail.com"},{"name":"jandelles","email":"pan.jandelles@gmail.com"},{"name":"jthoo","email":"justin.thoo@gmail.com"}],"_npmUser":{"name":"cabbiepete","email":"cabbiepete@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/grunt-assets-versioning_1.0.10_1552351599245_0.5691159953501133"},"_hasShrinkwrap":false},"1.0.11":{"name":"@drugscom/grunt-assets-versioning","description":"Versioning static assets with Grunt","version":"1.0.11","homepage":"https://github.com/drugscom/grunt-assets-versioning","author":{"name":"Peter Simmons","email":"peter.simmons@drugs.com"},"repository":{"type":"git","url":"git://github.com/drugscom/grunt-assets-versioning.git"},"bugs":{"url":"https://github.com/drugscom/grunt-assets-versioning/issues"},"licenses":[{"type":"MIT","url":"https://github.com/drugscom/grunt-assets-versioning/blob/master/LICENSE-MIT"}],"main":"Gruntfile.js","engines":{"node":">= 6"},"scripts":{"test":"grunt test"},"license":"MIT","devDependencies":{"debug":"^4.1.1","grunt":"~1.0.3","grunt-contrib-clean":"~2.0.0","grunt-contrib-concat":"~1.0.1","grunt-contrib-jshint":"~2.0.0","grunt-contrib-nodeunit":"~2.0.0","grunt-jsdoc":"^2.3.0","mock-fs":"^4.8.0"},"peerDependencies":{"grunt":">=1"},"keywords":["gruntplugin"],"dependencies":{"lodash":"^4.17.11","moment":"^2.24.0","slash":"^2.0.0"},"directories":{"test":"test"},"gitHead":"10147ac465c9ef3350cba5104fd747e7c483d9f4","_id":"@drugscom/grunt-assets-versioning@1.0.11","_nodeVersion":"8.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-RwmHHJLV+q17sJJFmorUHIa086q6wHq/VgLJA+fqHhLAjsOWEXbckZWalJ9yOjUnQx2zzSloMDqSTjgQhS0k0Q==","shasum":"277f0462d4c77f95babe3e35e8d88a855629682d","tarball":"https://registry.npmjs.org/@drugscom/grunt-assets-versioning/-/grunt-assets-versioning-1.0.11.tgz","fileCount":18,"unpackedSize":48333,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchwkgCRA9TVsSAnZWagAAdEQQAJD+F56L79iCzeoQPwes\nEXbQCNJmoco4thjcyfQYygDDMySDHZ5p4H649M/lBVxFzSZe27egOW6CdlYU\n1IZTA+D8h/OzpHoGRJLk6e8s5ecSjNs7kx5V/zIFHqULPF0xaQwFxc7nJWtu\neQ8Itny2wa+FmvQWxJY5CVdJcZVvt88gjKqQOGuBZoqDsHsoVsBBXA0GNiTL\nuJFLAWm3XwM9CO2eLdSYS6znuYegc1uD99+0z/a0R+LkO1shoI0qtp6yv4VJ\nUphf5axc8Grts+7P57i+JfMFRkxVCy3rydVfzgLOn6jrm5LYtxxaZsnyAa1E\nmP7YhfzzoPIKsb50BYESX6nvSu1rxRa4wY/jKfL/QApQAVQ47XUafIpQPja3\nu9oX3/CXJq4PGELYEnY3bNDtegiiiTJ6cZXO9IhDJqbQL82pxvk3KTK384de\nRS0HFMgOAZfQoIbRL6Wkre8qO1tAsP8zkyDTxQYYJT//6uM6+HQp4o0hFiND\nrgvUkUJF3fkIPeiNA1dypcjdu/Vb2dQbLKT+cod0usVzIDac5OlyPTVivmdx\nWSR4BPJstYObkZ+WWt2KxB1vEJ2qMEig8eqQqypEFWztEjr0RcztUIv6hQfu\nzjg0OT3CemcnBpwMzhlPrSZJEbYVjCa/AbG/Ftu+yBvrL9+BOrpGYFOH4/gl\nxNS4\r\n=XVCX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWQHf3He/XnWVt1azsOMa09CvoF4xfkKOjvKjelOk75wIgeTzaTwkMvn1XdoUlWZFF36L16bQq8vQ8O3aTve5zeHA="}]},"maintainers":[{"name":"cabbiepete","email":"cabbiepete@gmail.com"},{"name":"jandelles","email":"pan.jandelles@gmail.com"},{"name":"jthoo","email":"justin.thoo@gmail.com"},{"name":"noodlesnz","email":"nick@noodles.net.nz"}],"_npmUser":{"name":"cabbiepete","email":"cabbiepete@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/grunt-assets-versioning_1.0.11_1552353568146_0.07918156354795558"},"_hasShrinkwrap":false},"1.0.12":{"name":"@drugscom/grunt-assets-versioning","description":"Versioning static assets with Grunt","version":"1.0.12","homepage":"https://github.com/drugscom/grunt-assets-versioning","author":{"name":"Peter Simmons","email":"peter.simmons@drugs.com"},"repository":{"type":"git","url":"git://github.com/drugscom/grunt-assets-versioning.git"},"bugs":{"url":"https://github.com/drugscom/grunt-assets-versioning/issues"},"licenses":[{"type":"MIT","url":"https://github.com/drugscom/grunt-assets-versioning/blob/master/LICENSE-MIT"}],"main":"Gruntfile.js","engines":{"node":">= 6"},"scripts":{"test":"grunt test"},"license":"MIT","devDependencies":{"debug":"^4.1.1","grunt":"~1.0.3","grunt-contrib-clean":"~2.0.0","grunt-contrib-concat":"~1.0.1","grunt-contrib-jshint":"~2.0.0","grunt-contrib-nodeunit":"~2.0.0","grunt-jsdoc":"^2.3.0","mock-fs":"^4.8.0"},"peerDependencies":{"grunt":">=1"},"keywords":["gruntplugin"],"dependencies":{"lodash":"^4.17.11","moment":"^2.24.0","slash":"^2.0.0"},"directories":{"test":"test"},"gitHead":"8bfe172d6b4b7221bf92e3ee01734fc7b7c47717","_id":"@drugscom/grunt-assets-versioning@1.0.12","_nodeVersion":"8.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ZMzgRoxlruLMxBTf3vbLxMq7lVa7ixKPEt21gzvYkZ94UYikRWVOPPEgQwD/AJ9UGT1eiw5udMLvWLrvD1rMXQ==","shasum":"9cce192af2a37b66b03c907abbe87e0a6b04c44e","tarball":"https://registry.npmjs.org/@drugscom/grunt-assets-versioning/-/grunt-assets-versioning-1.0.12.tgz","fileCount":18,"unpackedSize":48116,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchwqPCRA9TVsSAnZWagAA+9oQAImPdrI08RqqydC3nYkX\n8XEMezPLIOiHbHCCdtT3z4tBqRKyFdB6HX9rxPeZv81/WjpO+eo4GxENLDB/\n0v3MqHiBqS8BLxo2GJ1y99Ox/HvZFg1iUWeBtqEA/SUlkM7HaU+NzL7AAk36\nL187UUx7foQ2GYBGIwf1JyLX+ozrPGL50tSAjA7nTbooHCDHhfaI6+yo9hPZ\nKvZhsMhvopXmc4YlLsJ9NnBD/Pp0FkCSl2sK7LvLXW34h2CfxaOjTIfdoPvd\n+vfXSUIxyR1iHpoGQ5imOHTTg+qeajZrW8XVE7T/wXJhbCy4ptZ6x3/9vFh7\n+uhooAmxKdT34+QFDHKNfQawH9CxGgsejufPlegn+9E/1IDaTOLvGnrV6GFw\nI36mlcfJjPukMH55E90GKz8iIHYSrgo1R4FDeLq91fqu+QzjCMzkwFMZp8BJ\nCs/ZgEe1UQRv49MG5dfuuYwCF3ranNeio1IPO0rU/A0TNZkv54lm8GpWLHYW\ngDO2WZRrec/FR034IWHsQ1lU+Tsfr8mN+XTr+/CpJ7yOZTF637M/IiZBURV4\nSZ5uWY4QK/3p8M1sw+qPJLBzKFrybosGh68lqgwQqybuuJeHjtZ6xcCtbdbT\no54w9wVBvJjthA4p182FYOIrxkoLF2uaFwl3hxI07a8C4wfFlpwStpYPeQFs\ntBqc\r\n=Rp4a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeSctvLWFfHeq/hzyaZOrsfv6vVWUj8S9OBBMELJX6cwIgdpWjHMbxU+AimH/mruO3ftQ9mcZSQ2tapJALzeXvJRI="}]},"maintainers":[{"name":"cabbiepete","email":"cabbiepete@gmail.com"},{"name":"jandelles","email":"pan.jandelles@gmail.com"},{"name":"jthoo","email":"justin.thoo@gmail.com"},{"name":"noodlesnz","email":"nick@noodles.net.nz"}],"_npmUser":{"name":"cabbiepete","email":"cabbiepete@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/grunt-assets-versioning_1.0.12_1552353935151_0.183207993950119"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-12T00:46:39.095Z","1.0.10":"2019-03-12T00:46:39.413Z","modified":"2022-05-19T04:10:45.724Z","1.0.11":"2019-03-12T01:19:28.353Z","1.0.12":"2019-03-12T01:25:35.439Z"},"maintainers":[{"email":"tech+npm@drugs.com","name":"ddccommit"},{"email":"pan.jandelles@gmail.com","name":"jandelles"},{"email":"justin.thoo@gmail.com","name":"jthoo"},{"email":"asenci@gmail.com","name":"asenci"},{"email":"kimpark8821@hotmail.com","name":"kimpark8821"}],"description":"Versioning static assets with Grunt","homepage":"https://github.com/drugscom/grunt-assets-versioning","keywords":["gruntplugin"],"repository":{"type":"git","url":"git://github.com/drugscom/grunt-assets-versioning.git"},"author":{"name":"Peter Simmons","email":"peter.simmons@drugs.com"},"bugs":{"url":"https://github.com/drugscom/grunt-assets-versioning/issues"},"license":"MIT","readme":"# @drugscom/grunt-assets-versioning \n\n> Versioning static assets with Grunt\n\n## Getting Started\nThis plugin requires Grunt `>=1`\n\nIf 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:\n\n```shell\nnpm install @drugscom/grunt-assets-versioning --save-dev\n```\n\nOne the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('@drugscom/grunt-assets-versioning');\n```\n\n## The \"assets_versioning\" task\n\n### Overview\nIn your project's Gruntfile, add a section named `assets_versioning` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  assets_versioning: {\n    options: {\n      // Task-specific options go here.\n    },\n    your_target: {\n      options: {\n        tasks: ['uglify:targetTask']\n      }\n    },\n  },\n})\n```\n\nThis task will version the files output by the task uglify:targetTask.\n\n### Options\n\n#### options.tag\nType: `String`\nPossible values: `date`, `hash`\nDefault value: `hash`\n\nShould the revision marker be a md5 hash or a date ?\n\n#### options.hashLength\nType: `Integer`\nDefault value: `8`\n\nIf you choose to version your files using a hash, hashLength let you set how long the hash is going to be.\n\n#### options.dateFormat\nType: `String`\nDefault value: `YYYYMMDDHHmmss`\n\nIf you choose to version your files using a date, you can specify a dateformat. grunt-assets-versioning is using moment.js to format date.\n\n#### options.timezoneOffset\nType: `Number`\nDefault value: `0`\n\nOnly works if you choose to version your files using a date.\nTimezone offset (in hours) to take into account when generating the date version tag. By default, set to 0 (GMT time).\n\n#### options.tasks\nType: `Array` or `Boolean`\nDefault value: `false`\n\nThe tasks you want to run while versioning their destination files.\n\n#### options.versionsMapFile\nType: `String`\nPath to the file in which the versions map will be dumped.\n\nThe assets versioning files outputs a map of versions of all the files processed. Here's how that map looks like:\n```\n[\n  {\n    version: '3d04f375',\n    originalPath: 'path/to/bundle-a.js',\n    versionedPath: 'path/to/bundle-a.3d04f375.js'\n  },\n  {\n    version: '92jdi2j1',\n    originalPath: 'path/to/bundle-b.js',\n    versionedPath: 'path/to/bundle-b.92jdi2j1.js'\n  }\n]\n```\n\nBy default you can retrieve the map of versions by accessing this configuration variable.\n`grunt.config('assets_versioning.yourTask.versionsMap')`\nThe versionsMapFile gives you the possibility to also output that map to a file.\n\n#### options.versionsMapTemplate\nType: `String`\nDefault value: `null`\n\nPath to a lodash template file that is going to be used to generate the versions map file (options.versionsMapFile)\n\nBy default, when no template is indicated, the task will output a json file.\n\nThe lo-dash template may reuse the keys from the version maps (version, originalPath, versionedPath).\nHere's an example of a lo-dash template to generate a php dictionary.\n\n```php\n<?php\n\nclass MyDict\n{\n  public static $myDict = array(\n<% _.forEach(files, function(file) { %>\n    \"<%= file.originalPath %>\" => \"<%= file.versionedPath %>\",\n<% }); %>\n  );\n```\n\n#### options.versionsMapTrimPath\nType: `String`\nThis gives you the possibility to trim the path output in the version map.\n\nFor example, if you set options.versionsMapTrimPath to be 'super/long/path/to/', instead of getting this map:\n\n```\n[\n  {\n    version: '3d04f375',\n    originalPath: 'super/long/path/to/bundle-a.js',\n    versionedPath: 'super/long/path/to/bundle_a.3d04f375.js'\n  },\n  {\n    version: '92jdi2j1',\n    originalPath: 'super/long/path/to/bundle-b.js',\n    versionedPath: 'super/long/path/to/bundle-b.92jdi2j1.js'\n  }\n]\n```\n\nyou will get this one:\n\n\n```\n[\n  {\n    version: '3d04f375',\n    originalPath: 'bundle-a.js',\n    versionedPath: 'bundle_a.3d04f375.js'\n  },\n  {\n    version: '92jdi2j1',\n    originalPath: 'bundle-b.js',\n    versionedPath: 'bundle-b.92jdi2j1.js'\n  }\n]\n```\n\n#### options.skipExisting\nType: `Boolean` or `Array`\nDefault value: `false`\n\nIf true, will skip the task if the destination file already exists.\nIf type Array, will skip the task if the destination file, once versioned, is listed in the array.\n\n#### options.post\nType: `Boolean`\nDefault value: `false`\n\nBy default, the grunt-assets-versioning task uses the content of the source files to create a version hash.\nCombined with the skipExisting option, it allows to speed up the deployment process by skipping tasks that would output an already-existing destination file.\n\nIf ever you're trying to version a task that doesn't expose all its source files but only an entry point (less, requirejs), you should set the post options to true.\n\n```\nless: {\n  production: {\n    files: {\n      \"path/to/result.css\": \"path/to/source.less\"\n    }\n  }\n},\nassets_versioning: {\n  css: {\n    options: {\n      post: true,\n      tasks: [\"less:production\"]\n    }\n  }\n}\n```\n\n### Usage Examples\n\n#### Versioning using a hash\nIn this example, dest.bundle.js is going to be versioned with a hash. All sources files are going to be hashed and those hashes are also going to be hashed. The generated result should be\ndest/bundle.2j4h2kds.js\n\n```js\ngrunt.initConfig({\n  assets_versioning: {\n    options: {\n      tag: 'hash',\n      hashLength: 6,\n    },\n    files: {\n      'dest/bundle.js': ['src/file1.js', 'src/file2.js'],\n    },\n  },\n})\n```\n\n#### Versioning using a date\nIn this example, dest.bundle.js is going to be versioned with a date, using\nthe default format YYYYMMDDHHmmss. The newest modification dates of all src files is\ngoing to be used to create this timestamp. The generated result should be\ndest/bundle.20130413004500.js\n\n```js\ngrunt.initConfig({\n  assets_versioning: {\n    options: {\n      tag: 'date',\n    },\n    files: {\n      'dest/bundle.js': ['src/file1.js', 'src/file2.js'],\n    },\n  },\n})\n```\n\n## Contributing\nIn 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/).\n\n## Release History\n\n* 2019-03-12   v1.0.11  Fork from https://github.com/theasta/grunt-assets-versioning and dependancies updated \n* 2015-01-29   v1.0.4   Fix MomentJS warning\n* 2015-01-28   v1.0.3   Bug fixing.\n* 2014-11-22   v1.0.2   Add a post mode which generates the version hash based on the destination files and not the source files.\n* 2014-11-02   v1.0.1   Add the ability to generate a version map based on a lo-dash template\n* 2014-11-02   v1.0.0   options.tasks accepts multiple.tasks. options.use replaced by options.tag\n* 2014-11-01   v0.6.0   Major refactoring. skipVersioning false by default. options.versionsMapFile replaces options.output\n* 2014-10-12   v0.5.0   Add tasks option that will eventually replace options.multitask and options.multitaskTarget. Only accept a single task so far.\n* 2014-10-11   v0.4.0   Skip task by providing an array of destination files to ignore.\n* 2014-10-10   v0.3.1   Provide more feedback in debug mode. Improve unit tests coverage significantly.\n* 2014-09-27   v0.3.0   Concatenate files if no surrogate task is passed. Changes in default options. Use hash instead of date. Skip versioning if destination file already exists.\n* 2014-09-26   v0.2.0   Travis Integration, options.timezoneOffset (default: 0 - UTC Time)\n* 2013-06-30   v0.1.5   Update JSHint Configuration and fix warnings\n* 2013-06-30   v0.1.4   Make it work with the Compact format file mapping\n* 2013-06-02   v0.1.3   Fix dateFormat bug\n* 2013-06-02   v0.1.2   Minor bug fixes\n* 2013-05-01   v0.1.1   Add Surrogate tasks and documentation\n* 2013-04-26   v0.1.0   Initial commit\n","readmeFilename":"README.md"}