{"versions":{"9.0.1":{"name":"gulp-rev-dxb","version":"9.0.1","description":"Static asset revisioning by appending content hash to filenames: unicorn.css => unicorn-d41d8cd98f.css I'm just modifying the example demo.css => demo.css?V=5a6b8d.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/gulp-rev.git"},"author":{"name":"Abao"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava"},"keywords":["gulpplugin","rev","revving","revision","hash","optimize","version","versioning","cache","expire","static","asset","assets"],"dependencies":{"modify-filename":"^1.1.0","plugin-error":"^1.0.1","rev-hash":"^2.0.0","rev-path-dxb":"^2.0.1","sort-keys":"^2.0.0","through2":"^2.0.0","vinyl":"^2.1.0","vinyl-file":"^3.0.0"},"devDependencies":{"ava":"^0.25.0","p-event":"^2.1.0","xo":"^0.23.0"},"_from":"gulp-rev@9.0.0","_resolved":"http://registry.npm.taobao.org/gulp-rev/download/gulp-rev-9.0.0.tgz","bugs":{"url":"https://github.com/sindresorhus/gulp-rev/issues"},"homepage":"https://github.com/sindresorhus/gulp-rev#readme","_id":"gulp-rev-dxb@9.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"anonymous","email":"814664322@qq.com"},"dist":{"integrity":"sha512-QYxQ1SehNHJGwvt1xlWJsDKr+oXFInybt0CNrPUg5SHRMYn93ZydzHVgbSfdx52TmqDN1/3Hj3cgZSbaM88/+w==","shasum":"800d0b0de79ba344986f08dc7c576ea85ae3ce6f","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/gulp-rev-dxb/-/gulp-rev-dxb-9.0.1.tgz","fileCount":4,"unpackedSize":11305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb+5+rCRA9TVsSAnZWagAAiu8QAJvFizkJOUwdFTYiuH2E\nK84+MFMUNuo/pxgQpk0PVYQQLszatbqKIy9Sp93/pFosVyU1iNkFWHei6QO/\nJ4fDlYcRMMe8LYQLY9QoWxbSxkOkw5ttnAsTcCcu9c25dQEYvvr3KtWnxp+c\nSn+unzwGnBgBz2iM1JeqTCssz+gbxEZdqbasZF9TxEoR8LLH9s0x7T5xPF+Q\nrF+fHDLecLwANR3BsWIV4VCOmeS/Ky/mY4wXrEdLUq/EfSDopzUi76PEXPFz\ntiOshHpv68SGCEOMlU3gE4vtSsmdpnQcE8uk+IbFoEg63br0gPOdbq6UwZ8G\n2E+oPeIVB2aIjkeyWKt+l/RVgIGREXqnaJSzPDTlPKts2a/UekPdy055Vb+s\npCGfRASOLvYkw2kv0vmOhcVXgs4601yvPm04MkwzEiNx4kk4hcU/bcjd3twl\ncTK4LLPlFJNo6ND1TqSh/OKhBThvcDK2ZQvcs8CAkYkvt56HrGLRP7n1OUxY\nmWGhXTSDI+awUEj4B+cGIGkKjOgIydL66AheqM04bpJ+d3aM23yZRgFiDsKj\nCFl5ZQiKiqkVZCD8W5tLTs15l8ilveE0Nv5tnwXG0uEspbXAd+eyHOHU4CGz\ndDyicigGcROfvacUil5eGCddewx+ha0S1KkKPikcO/dD9n3hJSIT/+I6ImIm\nqbve\r\n=1DdE\r\n-----END PGP SIGNATURE-----\r\n","size":4408},"maintainers":[{"name":"anonymous","email":"814664322@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-rev-dxb_9.0.1_1543217066796_0.4825604156190779"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-23T04:06:49.450Z","contributors":[]}},"dist-tags":{"latest":"9.0.1"},"name":"gulp-rev-dxb","time":{"created":"2022-01-26T20:17:43.087Z","modified":"2022-01-26T20:17:43.087Z","9.0.1":"2018-11-26T07:24:26.890Z"},"readme":"# gulp-rev-dxb [![Build Status](https://travis-ci.org/sindresorhus/gulp-rev-dxb.svg?branch=master)](https://travis-ci.org/sindresorhus/gulp-rev-dxb) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) [![Gitter](https://badges.gitter.im/join_chat.svg)](https://gitter.im/sindresorhus/gulp-rev-dxb)\n\n> Static asset revisioning by appending content hash to filenames\n> `unicorn.css` → `unicorn.css?v=d41d8cd98f`\n\n**This project is feature complete.**\n\nMake sure to set the files to [never expire](http://developer.yahoo.com/performance/rules.html#expires) for this to have an effect.\n\n---\n\n---\n\n\n## Install\n\n```\n$ npm install --save-dev gulp-rev-dxb\n```\n\n\n## Usage\n\n```js\nconst gulp = require('gulp');\nconst rev = require('gulp-rev-dxb');\n\ngulp.task('default', () =>\n\tgulp.src('src/*.css')\n\t\t.pipe(rev())\n\t\t.pipe(gulp.dest('dist'))\n);\n```\n\n\n## API\n\n### rev()\n\n### rev.manifest([path], [options])\n\n#### path\n\nType: `string`<br>\nDefault: `rev-manifest.json`\n\nManifest file path.\n\n#### options\n\n##### base\n\nType: `string`<br>\nDefault: `process.cwd()`\n\nOverride the `base` of the manifest file.\n\n##### cwd\n\nType: `string`<br>\nDefault: `process.cwd()`\n\nOverride the current working directory of the manifest file.\n\n##### merge\n\nType: `boolean`<br>\nDefault: `false`\n\nMerge existing manifest file.\n\n##### transformer\n\nType: `object`<br>\nDefault: `JSON`\n\nAn object with `parse` and `stringify` methods. This can be used to provide a\ncustom transformer instead of the default `JSON` for the manifest file.\n\n\n### Original path\n\nOriginal file paths are stored at `file.revOrigPath`. This could come in handy for things like rewriting references to the assets.\n\n\n### Asset hash\n\nThe hash of each rev'd file is stored at `file.revHash`. You can use this for customizing the file renaming, or for building different manifest formats.\n\n\n### Asset manifest\n\n```js\nconst gulp = require('gulp');\nconst rev = require('gulp-rev-dxb');\n\ngulp.task('default', () =>\n\t// By default, Gulp would pick `assets/css` as the base,\n\t// so we need to set it explicitly:\n\tgulp.src(['assets/css/*.css', 'assets/js/*.js'], {base: 'assets'})\n\t\t.pipe(gulp.dest('build/assets'))  // copy original assets to build dir\n\t\t.pipe(rev())\n\t\t.pipe(gulp.dest('build/assets'))  // write rev'd assets to build dir\n\t\t.pipe(rev.manifest())\n\t\t.pipe(gulp.dest('build/assets'))  // write manifest to build dir\n);\n```\n\nAn asset manifest, mapping the original paths to the revisioned paths, will be written to `build/assets/rev-manifest.json`:\n\n```json\n{\n\t\"css/unicorn.css\": \"css/unicorn.css?v=d41d8cd98f\",\n\t\"js/unicorn.js\": \"js/unicorn.js?=273c2c123f\"\n}\n```\n\nBy default, `rev-manifest.json` will be replaced as a whole. To merge with an existing manifest, pass `merge: true` and the output destination (as `base`) to `rev.manifest()`:\n\n```js\nconst gulp = require('gulp');\nconst rev = require('gulp-rev-dxb');\n\ngulp.task('default', () =>\n\t// By default, Gulp would pick `assets/css` as the base,\n\t// so we need to set it explicitly:\n\tgulp.src(['assets/css/*.css', 'assets/js/*.js'], {base: 'assets'})\n\t\t.pipe(gulp.dest('build/assets'))\n\t\t.pipe(rev())\n\t\t.pipe(gulp.dest('build/assets'))\n\t\t.pipe(rev.manifest({\n\t\t\tbase: 'build/assets',\n\t\t\tmerge: true // Merge with the existing manifest if one exists\n\t\t}))\n\t\t.pipe(gulp.dest('build/assets'))\n);\n```\n\nYou can optionally call `rev.manifest('manifest.json')` to give it a different path or filename.\n\n\n## Sourcemaps and `gulp-concat`\n\nBecause of the way `gulp-concat` handles file paths, you may need to set `cwd` and `path` manually on your `gulp-concat` instance to get everything to work correctly:\n\n```js\nconst gulp = require('gulp');\nconst rev = require('gulp-rev-dxb');\nconst sourcemaps = require('gulp-sourcemaps');\nconst concat = require('gulp-concat');\n\ngulp.task('default', () =>\n\tgulp.src('src/*.js')\n\t\t.pipe(sourcemaps.init())\n\t\t.pipe(concat({path: 'bundle.js', cwd: ''}))\n\t\t.pipe(rev())\n\t\t.pipe(sourcemaps.write('.'))\n\t\t.pipe(gulp.dest('dist'))\n);\n```\n\n\n## Different hash for unchanged files\n\nSince the order of streams are not guaranteed, some plugins such as `gulp-concat` can cause the final file's content and hash to change. To avoid generating a new hash for unchanged source files, you can:\n\n- Sort the streams with [gulp-sort](https://github.com/pgilad/gulp-sort)\n- Filter unchanged files with [gulp-unchanged](https://github.com/sindresorhus/gulp-changed)\n- Read more about [incremental builds](https://github.com/gulpjs/gulp#incremental-builds)\n\n\n## Streaming\n\nThis plugin does not support streaming. If you have files from a streaming source, such as Browserify, you should use [`gulp-buffer`](https://github.com/jeromew/gulp-buffer) before `gulp-rev-dxb` in your pipeline:\n\n```js\nconst gulp = require('gulp');\nconst browserify = require('browserify');\nconst source = require('vinyl-source-stream');\nconst buffer = require('gulp-buffer');\nconst rev = require('gulp-rev-dxb');\n\ngulp.task('default', () =>\n\tbrowserify('src/index.js')\n\t\t.bundle({debug: true})\n\t\t.pipe(source('index.min.js'))\n\t\t.pipe(buffer())\n\t\t.pipe(rev())\n\t\t.pipe(gulp.dest('dist'))\n);\n```\n\n\n## Integration\n\nFor more info on how to integrate `gulp-rev-dxb` into your app, have a look at the [integration guide](integration.md).","users":{}}