All Projects → voronianski → Versionify Assets

voronianski / Versionify Assets

Function to get checksum of file and add to url querystring for cache busting

Programming Languages

javascript
184084 projects - #8 most used programming language

versionify-assets

npm version Dependency Status

Simply add checksum of .js/.css file to url querystring for cache busting.

Install

npm install versionify-assets --save

Usage

var versionifyAssets = require('versionify-assets');

// set assets folder optionally, defaults to './public'
// will look for folder starting from project root
versionifyAssets.setFolder('./static');

// returns string with querystring
console.log(versionifyAssets('/app.js'));
// "/app.js?9b8cebc0421241d087f6ab7e815285af803de7e7"

MIT Licensed

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].