gulp-md5-version
md5 plugin for gulp ,md5 the static files and then create a versonMapping file.
Usage
First, install gulp-md5-version
as a development dependency:
npm install --save-dev gulp-md5-version
Then, add it to your gulpfile.js
:
var md5 = ; gulp ;
will create a versions.mapping
API
md5(config)
config.hashLength
Type:
String
Default: 32
Optionnal: you can pass the size to limit the size of the hash that is appended.
config.pattern
Type:
String
Default: @
Optionnal: Hash connector
config.versionName
Type:
String
Default: versions.mapping
Optionnal: version file name
config.versionPath
Type:
String
Default: prd/
Optionnal: version root path
Example:
gulp
The sample above will append the md5 hash to each of the file in the src/ folder then create a .ver file in the /prd with all versionMapping;
License
http://en.wikipedia.org/wiki/MIT_License[MIT License]