source: trip-planner-front/node_modules/@angular/cdk/schematics/utils/project-main-file.mjs

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.8 KB
Line 
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 */
9Object.defineProperty(exports, "__esModule", { value: true });
10exports.getProjectMainFile = void 0;
11const schematics_1 = require("@angular-devkit/schematics");
12const project_targets_1 = require("./project-targets");
13/** Looks for the main TypeScript file in the given project and returns its path. */
14function getProjectMainFile(project) {
15 const buildOptions = project_targets_1.getProjectTargetOptions(project, 'build');
16 if (!buildOptions.main) {
17 throw new schematics_1.SchematicsException(`Could not find the project main file inside of the ` +
18 `workspace config (${project.sourceRoot})`);
19 }
20 return buildOptions.main;
21}
22exports.getProjectMainFile = getProjectMainFile;
23//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvamVjdC1tYWluLWZpbGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvY2RrL3NjaGVtYXRpY3MvdXRpbHMvcHJvamVjdC1tYWluLWZpbGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7O0FBSUgsMkRBQStEO0FBQy9ELHVEQUEwRDtBQUUxRCxvRkFBb0Y7QUFDcEYsU0FBZ0Isa0JBQWtCLENBQUMsT0FBMEI7SUFDM0QsTUFBTSxZQUFZLEdBQUcseUNBQXVCLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0lBRS9ELElBQUksQ0FBQyxZQUFZLENBQUMsSUFBSSxFQUFFO1FBQ3RCLE1BQU0sSUFBSSxnQ0FBbUIsQ0FBQyxxREFBcUQ7WUFDL0UscUJBQXFCLE9BQU8sQ0FBQyxV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