cache-bust

Create cache-busted versions of a file using the MD5 hash of the file's contents.

cache-bust

Create cache-busted versions of a file using the MD5 hash of the file's contents.

$ npm install cache-bust
var bust = require('cache-bust');
var file = path.resolve(__dirname, 'build.js');
 
bust(file); // creates a "build-43c191bf6d6c3f263a8cd0efd4a058ab.js" 

Create a cache-busted version of file in the same directory, removing previously cache-busted copies if they exist.

Options:

{
  remove: false
}

Remove any existing cache-busted versions of a file.

Return the cache-busted alias for a given file.

MIT