project-index-html.js 855 B

123456789101112131415161718192021
  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.io/license
  8. */
  9. Object.defineProperty(exports, "__esModule", { value: true });
  10. const schematics_1 = require("@angular-devkit/schematics");
  11. const schematics_2 = require("@angular/cdk/schematics");
  12. /** Looks for the index HTML file in the given project and returns its path. */
  13. function getIndexHtmlPath(project) {
  14. const buildOptions = schematics_2.getProjectTargetOptions(project, 'build');
  15. if (!buildOptions.index) {
  16. throw new schematics_1.SchematicsException('No project "index.html" file could be found.');
  17. }
  18. return buildOptions.index;
  19. }
  20. exports.getIndexHtmlPath = getIndexHtmlPath;
  21. //# sourceMappingURL=project-index-html.js.map