Get the revved file path of a file
Reads the file, MD5 hashes it, truncates the hash to 10 characters, appends it to the filename, and returns the modified path.
$ npm install --save rev-file
const revFile = require('rev-file');
revFile('src/unicorn.png').then(filpath => {
console.log(filepath);
//=> 'src/unicorn-bb9d8fe615.png'
});
Returns a promise for a revved filepath.
Return a revved filepath.
MIT © Sindre Sorhus