grunt-hash is a Grunt plugin that appends a unique hash (MD5 or custom) to filenames for cache busting. It generates mapping files for server-side asset lookup. Stable version 0.5.0, last released in 2013. Requires Grunt 0.4.x. Differentiators: simple configuration, supports custom hash functions, and outputs mapping JSON. No longer actively maintained; consider alternatives like gulp-rev or webpack.
npm install grunt-hashNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Gruntfile configuration for grunt-hash with custom hash function, mapping output, and JS/CSS targets.
Migrate to gulp-rev or webpack chunk hashing.
Use grunt-cli with Grunt 0.4.x or wrap task.
Ensure dest directories exist before running grunt-hash.
Backup mapping file if needed.
Add grunt.loadNpmTasks('grunt-hash'); after initConfig.Run npm install grunt-hash --save-dev
Set hashFunction to a function returning hash string.