project-index-file.js 898 B

1234567891011121314151617181920
  1. "use strict";
  2. /**
  3. * @license
  4. * Copyright Google LLC All Rights Reserved.
  5. *
  6. * Use of this source code is governed by an MIT-style license that can be
  7. * found in the LICENSE file at https://angular.dev/license
  8. */
  9. Object.defineProperty(exports, "__esModule", { value: true });
  10. exports.getProjectIndexFiles = getProjectIndexFiles;
  11. const project_targets_1 = require("./project-targets");
  12. /** Gets the path of the index file in the given project. */
  13. function getProjectIndexFiles(project) {
  14. const paths = (0, project_targets_1.getProjectBuildTargets)(project)
  15. .filter(t => { var _a; return (_a = t.options) === null || _a === void 0 ? void 0 : _a['index']; })
  16. .map(t => t.options['index']);
  17. // Use a set to remove duplicate index files referenced in multiple build targets of a project.
  18. return Array.from(new Set(paths));
  19. }
  20. //# sourceMappingURL=project-index-file.js.map