Manifester
A fingerprint manifest reader.
Reads a JSON manifest (generated by e.g. https://github.com/sindresorhus/gulp-rev/) and returns a function you can use in your views to reference the fingerprinted file path while in development and production.
Installation
$ npm install manifester
Example
var assetPath = require('manifester')('./path/to/manifest.json', {localPath: '/assets'});
assetPath('test.js')
var prodAssetPath = require('manifester')('./path/to/manifest.json', {cdnUrl: 'https://d3.cloudfront.net/assets', env: 'production'});
prodAssetPath('test.js')
Usage
var assetPath = require('manifester')('./path/to/manifest.json', {
env: 'string',
localPath: 'string',
cdnUrl: 'string'
});
License
MIT