"use strict"; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ Object.defineProperty(exports, "__esModule", { value: true }); exports.getProjectIndexFiles = void 0; const project_targets_1 = require("./project-targets"); /** Gets the path of the index file in the given project. */ function getProjectIndexFiles(project) { const paths = (0, project_targets_1.getTargetsByBuilderName)(project, project_targets_1.defaultTargetBuilders.build) .filter(t => t.options?.index) .map(t => t.options.index); // Use a set to remove duplicate index files referenced in multiple build targets of a project. return Array.from(new Set(paths)); } exports.getProjectIndexFiles = getProjectIndexFiles; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvamVjdC1pbmRleC1maWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2Nkay9zY2hlbWF0aWNzL3V0aWxzL3Byb2plY3QtaW5kZXgtZmlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HOzs7QUFHSCx1REFBaUY7QUFFakYsNERBQTREO0FBQzVELFNBQWdCLG9CQUFvQixDQUFDLE9BQXFDO0lBQ3hFLE1BQU0sS0FBSyxHQUFHLElBQUEseUNBQXVCLEVBQUMsT0FBTyxFQUFFLHVDQUFxQixDQUFDLEtBQUssQ0FBQztTQUN4RSxNQUFNLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsT0FBTyxFQUFFLEtBQUssQ0FBQztTQUM3QixHQUFHLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsT0FBUSxDQUFDLEtBQWEsQ0FBQyxDQUFDO0lBRXRDLCtGQUErRjtJQUMvRixPQUFPLEtBQUssQ0FBQyxJQUFJLENBQUMsSUFBSSxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztBQUNwQyxDQUFDO0FBUEQsb0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