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>

20 lines 870 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.searchIndexesBuilder = searchIndexesBuilder; const tslib_1 = require("tslib"); const path_1 = tslib_1.__importDefault(require("path")); const rxjs_1 = require("rxjs"); const operators_1 = require("rxjs/operators"); const core_1 = require("../../core"); /** * * @param context */ function searchIndexesBuilder(context) { const builder = (0, rxjs_1.of)(void 0).pipe((0, core_1.runBuild)('SearchIndexes', async () => ({ content: JSON.stringify(core_1.IndexStore.asArray()), filePath: path_1.default.join(context.outAssetsDir, 'indexes.json'), }))); return (0, core_1.createBuilder)([(0, core_1.createSecondaryTrigger)(core_1.IndexStore.changes().pipe((0, operators_1.debounceTime)(50)))], () => builder); } //# sourceMappingURL=search-indexes.builder.js.map