{"versions":{"1.3.2":{"name":"gulp-rev-collector-dxb","version":"1.3.2","description":"Static asset revision data collector from manifests, generated from different streams, and replace their links in html template.I'm just modifying the example demo.css => demo.css?V=5a6b8d. There is other module name: gulp-rev-dxb.","license":"MIT","author":{"name":"A-bao","email":"814664322@qq.com"},"main":"index.js","scripts":{"test":"mocha"},"engines":{"node":">=0.10.0"},"keywords":["gulpplugin","gulp","rev","revision","version","versioning","static","asset","assets","collect","collector"],"dependencies":{"plugin-error":"^1.0.1","through2":">=0.5.1","underscore":"^1.6.0","vinyl":"^2.1.0"},"devDependencies":{"lodash.isequal":"^4.4.0","mocha":"*"},"_id":"gulp-rev-collector-dxb@1.3.2","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"anonymous","email":"814664322@qq.com"},"dist":{"integrity":"sha512-asw2NVCgyh7il0SI7u+YOtXUaPhwac/2NJ8HbV0Nkp9kSP4cdGUyn+bf4wKAbvN/8yv2ZeMRIvchkLuB3/rE9A==","shasum":"56d81b874d3aa8e84328a18b5286b222ff1704c0","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/gulp-rev-collector-dxb/-/gulp-rev-collector-dxb-1.3.2.tgz","fileCount":4,"unpackedSize":13173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb+59UCRA9TVsSAnZWagAApNAP/iqMLYdxKRQQ2LJ1enQ/\nzLKL0Y2VBnAPCqzmTCCpmckyMVNPtbQykuB5SuJ+iZ3j0C9eX+OXFKtgJm8e\n7gdNK4bC7JvfHhA8uIu2GJ9W7NWTKN7h289Jm3JjpJiWzvGv+E+8CSl7aaOF\n+viyDhoUYmDSrWcCvYjv+Zd8sG1GoLbzWTKQLLHa+qmwZTX/z5vwBs3fvKba\nYDxfWuDcUr/9TIU6s7l+bQdke6g0VCCDXKBNanxNXuWSjQojo8tA7tzFNTtv\npLEbYuJO3+5drkWagNeM5C5MUkmoCyRc8F39koEjGqw3y9vr+A4N6vpXSG6Q\n1NfiaZ1Z7PBZuz+bEXgEKfdf6nxHV0ptIOlerNvyH6SFYO4kJEw/4Jqk+iRl\nujeS7nGuBCmkB9ec/J6v7DKjr5XOlZU36MRxbAW0g6nkLBceiHLgLUnG9J2d\nsbsojyw7YMvsk0nFDI74KATOMb2aoTrHVEAtiYH62GEbQh3GEi8tSNB66iOv\n+C/uI6QOVtZtihBnviATTXvZKLMrwJs8dLz4mUy81Vzfsuy6iSC0bcaHl1W8\ntPO0Mgr0IEHpaVG6hZxPAk15thkzmpPi9SjUApSF5F8Sa6C/c4ys69nOPalx\nio13aRZ2/+5UEpYidio38lmAB2uUg3nVkXRcwD8SvjsWbxQBZ4PVDpEtCqpE\nyi5/\r\n=Juvf\r\n-----END PGP SIGNATURE-----\r\n","size":4550},"maintainers":[{"name":"anonymous","email":"814664322@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-rev-collector-dxb_1.3.2_1543216980136_0.6618723875358969"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-23T04:06:49.294Z","contributors":[]}},"dist-tags":{"latest":"1.3.2"},"name":"gulp-rev-collector-dxb","time":{"created":"2022-01-26T20:17:43.391Z","modified":"2022-01-26T20:17:43.391Z","1.3.2":"2018-11-26T07:23:00.295Z"},"readme":"[![Build Status](https://travis-ci.org/shonny-ua/gulp-rev-collector-dxb.svg)](https://travis-ci.org/shonny-ua/gulp-rev-collector-dxb)\n[![Dependencies](https://david-dm.org/shonny-ua/gulp-rev-collector-dxb.svg)](https://david-dm.org/shonny-ua/gulp-rev-collector-dxb)\n[![devDependencies](https://david-dm.org/shonny-ua/gulp-rev-collector-dxb/dev-status.svg)](https://david-dm.org/shonny-ua/gulp-rev-collector-dxb#info=devDependencies&view=table)\n[![NPM version](https://badge.fury.io/js/gulp-rev-collector-dxb.svg)](http://badge.fury.io/js/gulp-rev-collector-dxb)\n\n# gulp-rev-collector-dxb\n\n[![NPM](https://nodei.co/npm/gulp-rev-collector-dxb.png?downloads=true&stars=true)](https://nodei.co/npm/gulp-rev-collector-dxb/)\n\n> Static asset revision data collector from manifests, generated from different streams, and replace their links in html template.\n\n## Install\n\n```sh\n$ npm install --save gulp-rev-collector-dxb\n```\n\n## Usage\n\nWe can use [gulp-rev-dxb](https://www.npmjs.com/package/gulp-rev-dxb) to cache-bust several assets and generate manifest files for them. Then using gulp-rev-collector-dxb we can collect data from several manifest files and replace links to assets in html templates.\n\n```js\nvar gulp         = require('gulp');\nvar rev = require('gulp-rev-dxb');\n\ngulp.task('css', function () {\n    return gulp.src('src/css/*.css')\n        .pipe(rev())\n        .pipe(gulp.dest('dist/css'))\n        .pipe( rev.manifest() )\n        .pipe( gulp.dest( 'rev/css' ) );\n});\n\ngulp.task('scripts', function () {\n    return gulp.src('src/js/*.js')\n        .pipe(rev())\n        .pipe(gulp.dest('dist/js'))\n        .pipe( rev.manifest() )\n        .pipe( gulp.dest( 'rev/js' ) );\n});\n\n...\n\nvar revCollector = require('gulp-rev-collector-dxb');\nvar minifyHTML   = require('gulp-minify-html');\n\ngulp.task('rev', function () {\n    return gulp.src(['rev/**/*.json', 'templates/**/*.html'])\n        .pipe( revCollector({\n            replaceReved: true,\n            dirReplacements: {\n                'css': '/dist/css',\n                '/js/': '/dist/js/',\n                'cdn/': function(manifest_value) {\n                    return '//cdn' + (Math.floor(Math.random() * 9) + 1) + '.' + 'exsample.dot' + '/img/' + manifest_value;\n                }\n            }\n        }) )\n        .pipe( minifyHTML({\n                empty:true,\n                spare:true\n            }) )\n        .pipe( gulp.dest('dist') );\n});\n```\n\n### Options\n\n#### collectedManifest\n\nType : `String`\n\nIt is a filename for collecded and merged manifest data in `json` format.\n\n#### replaceReved\n\nType : `Boolean`\n\nYou set a flag, replaceReved, which will replace alredy replaced links in template's files. Default value is `false`.\n\n#### dirReplacements\n\nType : `Object`\n\nSpecifies a directories replacement set. [gulp-rev](https://github.com/sindresorhus/gulp-rev) creates manifest files without any info about directories. E.c. if you use dirReplacements param from [Usage](#usage) example, you get next replacement:\n\n```\n\"/css/style.css\" => \"/dist/css/style.css?v=1d87bebe\"\n\"/js/script1.js\" => \"/dist/script1.js?v=61e0be79\"\n\"cdn/image.gif\"  => \"//cdn8.example.dot/img/image.gif?v=35c3af8134\"\n```\n\n#### revSuffix\n\nType : `String`\n\nIt is pattern for define reved files suffixes. Default value is '-[0-9a-f]{8,10}-?'. This is necessary in case of e.c. [gulp-rename](https://github.com/hparra/gulp-rename) usage. If reved filenames had different from default mask.\n\n#### extMap\n\nType : `Object`\n\nIf You use some methods to modify the rev_manifest.json after use [gulp-rev](https://github.com/sindresorhus/gulp-rev) and get a result like this:\n```\n{\n    \"assets/less/common.less\": \"assets/css/common.css?v=2c0d21e40c\"\n}\n```\nIt means that keys and values in the rev_manifest.json have different ext : less & css.\n\nYou can define extentions maping rules for correct manifest file processing.\n\nDefault value is:\n```\n{\n    '.scss': '.css',\n    '.less': '.css',\n    '.jsx': '.js'\n}\n```\n\n### Works with gulp-rev-collector-dxb\n\n- [gulp-rev-dxb](https://www.npmjs.com/package/gulp-rev-dxb)","users":{}}