A Grunt 0.4 plugin for cache busting static files by renaming files with a content hash and updating references in HTML. Version 0.0.11 is the latest and appears stable though rarely updated. It differs from alternatives like grunt-cache-bust by supporting both filename-embedded hashes and query string parameters, and it also cleans up old hashed files. It requires Grunt ~0.4.0 as a peer dependency and operates in a Node environment >= 0.8.0.
npm install grunt-cache-bustingNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minimal Gruntfile configuring the cache-busting task for CSS files. The task renames style.css to include a content hash, updates all HTML references, and cleans up old hashed files.
Consider migrating to a modern alternative such as gulp-cache-bust or webpack's content hash.
Ensure replacement includes the full filename with extension (e.g., 'style.css'). For requirejs, provide the base name without extension (e.g., 'MainApp').
Verify that the file path in 'file' is correct and that the file exists before running the task.
For reliable cache busting, omit get_param or set it to false, so the filename is changed.
Run 'npm install grunt-cache-busting --save-dev' and add 'grunt.loadNpmTasks('grunt-cache-busting');' to your Gruntfile.Check that the file path is correct and the file exists before running the task.
Add a 'replacement' string to your cache-busting target, e.g., replacement: 'style.css'.
Add a 'file' string pointing to the file to be hashed, e.g., file: 'dist/css/style.css'.
Ensure 'replace' is an array of glob patterns, e.g., replace: ['src/**/*.html'].