express-rev
Middleware which adds helper functions for dealing with manifest files and file fingerprints.
Setup
Configure your ExpressJS project based on the example below. Include this middleware before rendering a view.
// index.js (example ExpressJS application) var express = ;var manifest = ;var app = ; app;app; app;app; app; moduleexports = app;
Now you can use rev
function in your views to print file path.
// index.jade (example jade view) doctype htmlhtml(lang='en') head title Asset Fingerprint Example link(rel='stylesheet', type='text/css', href=assetPath('index.css')) script(type='text/javascript', src='assetPath(index.js')) body img(src=assetPath('logo.png'))
Now all you need is a good asset-pipeline module. Use gulp with gulp-devkit for that.
Config
Open defaults.json file to see the default configuration values.
manifest: String
Path to JSON manifest file (e.g this file will generate the gulp-rev-all plugin). Manifest replace-process is ignored if the file does not exist.
prepend: String
URL path where static route for assets should be mounted.