Static asset revisioning by appending content hash to filenames.
var rev = new (require('task-rev'))
rev.run(inputs, options, logger)
Type: number
Default: 8
The number of characters of the file content hash append to the file name.
Type: string
Default: 'utf8'
The encoding of the file contents.
Type: string
Default: 'md5'
algorithm
is dependent on the available algorithms supported by the version of OpenSSL on the platform. Examples are 'sha1'
, 'md5'
, 'sha256'
, 'sha512'
, etc. On recent releases, openssl list-message-digest-algorithms
will display the available digest algorithms.
Type: string
Default: '{h}.{b}{e}'
{h}
is file hash value, {b}
is file basename, {e}
is file extname.
- 2014-05-29 0.1.0 Initial release.
Copyright (c) 2014 Yuanyan Cao. Licensed under the MIT license.