
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
grunt-filerev
Advanced tools
Static asset revisioning through file content hash
If you haven't used grunt before, be sure to check out the Getting Started guide, as it explains how to create a gruntfile as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:
npm install --save-dev grunt-usemin
This task will revision your files based on its contents. You should then set the files to expire far into the future for better caching and it will only update when it changes.
grunt.initConfig({
filerev: {
options: {
encoding: 'utf8',
algorithm: 'md5',
length: 8
},
images: {
src: 'img/**/*.{jpg,jpeg,gif,png,webp}'
}
},
});
Type: String
Default: 'utf8'
The file encoding.
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: Number
Default: 8
The number of characters of the file hash to prefix the file name with.
It will overwrite the src
files if you don't specify a dest
:
filerev: {
images: {
src: ['img1.png', 'img2.png'],
dest: 'tmp'
}
}
BSD license and copyright Google
FAQs
Asset revisioning by using file content hashing
The npm package grunt-filerev receives a total of 9,264 weekly downloads. As such, grunt-filerev popularity was classified as popular.
We found that grunt-filerev demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.