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');
});
html/home.html
<html>
<head>
<script src="myjsfile.js?v=__md5('myjsfile.js')"></script>
</head>
</html>
dest/home.html
<html>
<head>
<script src="myjsfile.js?v=8c16eea7f5"></script>
</head>
</html>
md5Fingerprint.filesToFolder(paths, dest, noDir, cb);
Files paths to proccess
The output destination
Do not generate directory. i.e. 'html' 'src'
The callback function after process complete