hashly
Version:
Renames static files with a hashcode for cache busting
20 lines (16 loc) • 539 B
JavaScript
;
// Supported manifest formats
var _manifestFormats = {
"json": true,
"tab": true,
"json-object": true,
"json-symfony": true
};
// Gets the correct serializer for the specified manifest format
exports.getSerializer = function (manifestFormat) {
manifestFormat = (manifestFormat || "json").toLowerCase();
if (!_manifestFormats[manifestFormat]) {
throw new Error("manifestFormat '" + manifestFormat + "' is not known.");
}
return require("./manifest-writer-" + manifestFormat);
};