UNPKG

@mischback/buster

Version:

buster is a tool to support cache busting for static assets of a website.

26 lines 936 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createManifestFile = exports.BusterManifestError = void 0; const errors_1 = require("./errors"); const json_interface_1 = require("./json-interface"); const logging_1 = require("./logging"); class BusterManifestError extends errors_1.BusterError { constructor(message) { super(message); } } exports.BusterManifestError = BusterManifestError; function createManifestFile(result, config) { return new Promise((resolve, reject) => { (0, json_interface_1.writeJsonToFile)(config.outFile, result) .then(() => { return resolve(); }) .catch((err) => { logging_1.logger.debug(err); return reject(new BusterManifestError("Could not create manifest file")); }); }); } exports.createManifestFile = createManifestFile; //# sourceMappingURL=manifest.js.map