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 861 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.runBuild = runBuild; const rxjs_1 = require("rxjs"); const operators_1 = require("rxjs/operators"); const builder_state_1 = require("./builder-state"); const handle_cache_strategy_1 = require("./handle-cache-strategy"); let builderId = 0; /** * * @param tag * @param project * @param skipIf * @param cacheStrategy */ function runBuild(tag, project, cacheStrategy) { const id = builderId++; return (source) => source.pipe((0, operators_1.switchMap)((args) => { return (0, rxjs_1.of)(args).pipe((0, operators_1.switchMap)((args, index) => (0, rxjs_1.from)(project(args, index)).pipe((0, builder_state_1.builderState)(tag))), (0, handle_cache_strategy_1.handleCacheStrategy)(`runBuild${id}`, cacheStrategy)); })); } //# sourceMappingURL=run-build.js.map