Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
grunt-md5vel
Advanced tools
Readme
Grunt plugin for generating MD5
filenames.
Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-md5vel
Then add this line to your project's grunt.js
gruntfile:
grunt.loadNpmTasks('grunt-md5vel');
Then specify what files you want to generate an md5 filename in your config:
grunt.initConfig({
md5vel: {
compile: {
files: [{
'dest/folder/': 'src/file'
}],
options: {
/** `prefix`, `suffix`, `hash`, `extension`, `template` accept `string`, `function` and `object`
* @type {String, Object, Function, void}
* Where object is keyed by the original value, such that the destinations file extension would become `new.dist.js` with the option `{ 'js': 'new.dist.js' }` for `script.js`
*/
prefix: '', // defaults to current basename of file,
hash: function(hash){
return hash.substr(0,8)
},
suffix: '',
extension: 'ext' || {
'js': 'my.js',
'css': 'our.css'
}
template: _.template(
"<%= _.filter([prefix, hash, suffix]).join(delimiter) %>" +
"<%= extension? '.':'' %><%= extension %>")
/**
* Called before determing the filename
* @param {Object} filename Contains filename compontents {
* prefix
* hash
* suffix
* extension
* template
* }
*/
beforeEach: function (filename, options){}
/**
* A callback after each file is written describing the change
* @param {Object} fileChange {
* newPath
* oldPath
* content
* }
*/
afterEach: function (fileChange) {},
/**
* A callback after all files are written with a summary of writes
* @param {[Object]} fileChanges [{newPath, oldPath, content}, …}]
*/
after: function (fileChanges) {}
}
}
}
});
FAQs
Generates md5 filenames.
We found that grunt-md5vel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).