A command line tool for watching for a directory and updating manifest files on changes
This is a command line tool for watching for a directory changes.
Each time a file is updated in this directory,
cachifest assembles an updated
manifest.json file which has a map of file renames
cachifest is useful for making efficient http caching with following features:
It can be achieved bu using
cachifest in this scheme:
cachifest(consider running it using upstart, monit, supervisord, etc.) to monitor a directory. Usually it should be static files dir in your project and it should be accessible via http.
'client.swf': 'client_v1354729620000203.swf''assets/bg.swf': 'assets/bg_v1354729620000203.swf'...
It's usually better to load
manifest.json?rand=... with some random payload to avoid
manifest.json caching for sure.
manifest.jsonit can be accessed by an alternative name
client.swfand send this file.
npm install [-g] cachifest
$ ./cachifest.js --helpUsage: node ./cachifest.js [--help] [--manifest file] [--dir dir]Options:--help print out help and exit [boolean]--manifest [default: "manifest.json"]--dir [default: "."]