gulp-resource-hash
A gulp plugin for cache files by adding a hash version append their name(like a.js?v=hash).
Install
npm install --save-dev gulp-resource-hash
Examples
Default
var gulp = ;var staticHash = ; gulp;
Input:
Output:
Options
asset: 'static'
The path to assets in your project
exts: ['js', 'css', 'png']
The extension list need add hash version
md5BuildAsset: 'static'
The path to assets in your project used by create md5 file
urlParamName: 'v'
自定义 URL 参数
isAdditionExt: false
是否在 URL 末尾附加原文件的扩展名