md5-fingerprint
v1.2.1
Published
Append md5 value to a path in order to prevent cache
Downloads
4
Readme
#Quick Examples
npm install md5-fingerprint --save
var md5Fingerprint = require('md5-fingerprint');
md5Fingerprint.filesToFolder(['html/**/home.html'], 'dest/', 'html', function(err){
if(err) throw err;
console.log('done');
});
##Before
html/home.html
<html>
<head>
<script src="myjsfile.js?v=__md5('myjsfile.js')"></script>
</head>
</html>
##After
dest/home.html
<html>
<head>
<script src="myjsfile.js?v=8c16eea7f5"></script>
</head>
</html>
#Options md5Fingerprint.filesToFolder(paths, dest, noDir, cb); ##paths Files paths to proccess ##dest The output destination ##noDir Do not generate directory. i.e. 'html' 'src' ##cb The callback function after process complete