source: trip-planner-front/node_modules/@angular/cdk/schematics/utils/get-project.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.6 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.getProjectFromWorkspace = void 0;
11const schematics_1 = require("@angular-devkit/schematics");
12/**
13 * Finds the specified project configuration in the workspace. Throws an error if the project
14 * couldn't be found.
15 */
16function getProjectFromWorkspace(workspace, projectName = workspace.extensions.defaultProject) {
17 const project = workspace.projects.get(projectName);
18 if (!project) {
19 throw new schematics_1.SchematicsException(`Could not find project in workspace: ${projectName}`);
20 }
21 return project;
22}
23exports.getProjectFromWorkspace = getProjectFromWorkspace;
24//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LXByb2plY3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvY2RrL3NjaGVtYXRpY3MvdXRpbHMvZ2V0LXByb2plY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7O0FBR0gsMkRBQStEO0FBRS9EOzs7R0FHRztBQUNILFNBQWdCLHVCQUF1QixDQUNuQyxTQUE4QixFQUM5QixjQUFjLFNBQVMsQ0FBQyxVQUFVLENBQUMsY0FBd0I7SUFDN0QsTUFBTSxPQUFPLEdBQUcsU0FBUyxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQUMsV0FBVyxDQUFDLENBQUM7SUFFcEQsSUFBSSxDQUFDLE9BQU8sRUFBRTtRQUNaLE1BQU0sSUFBSSxnQ0FBbUIsQ0FBQyx3Q0FBd0MsV0FBVyxFQUFFLENBQUMsQ0FBQztLQUN0RjtJ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