Generate a digest of contents and add to file object property.
$ npm install --save-dev pekeq/gulp-hash
const { src } = require('gulp');
const hash = require('gulp-hash');
exports.default = function() {
return src('src/images/**')
.pipe(hash()) // default: sha1
.pipe(...)
}
algorithm
: Hash algorithmmd5
sha1
(default)sha256
sha384
sha512
algorithm
: Hash algorithm (default: sha1
)property
: Custom property name (default: digest
)MIT
(c) Hideo Matsumoto