UNPKG

@ng-doc/builder

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>

22 lines 876 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createCache = createCache; const create_cache_for_file_1 = require("./create-cache-for-file"); /** * Creates cache for given files, returns object with file path as key and md5 hash as value * @param version - version of the current package * @param files - list of files, for which cache should be created * @param data - properties, which should be cached * @param result - result of the builder, which should be cached */ function createCache(version, files, data, result) { const cache = { version, data, result }; files?.forEach((filePath) => { if (!cache.files) { cache.files = {}; } cache.files[filePath] = (0, create_cache_for_file_1.createCacheForFile)(filePath); }); return cache; } //# sourceMappingURL=create-cache.js.map