UNPKG

893 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.updateImplicitDependencies = void 0;
4const devkit_1 = require("@nrwl/devkit");
5/**
6 * Updates the workspace.json file by renaming the project
7 *
8 * @param schema The options provided to the schematic
9 */
10function updateImplicitDependencies(tree, schema) {
11 for (const [projectName, project] of (0, devkit_1.getProjects)(tree)) {
12 if (project.implicitDependencies) {
13 const index = project.implicitDependencies.indexOf(schema.projectName);
14 if (index !== -1) {
15 project.implicitDependencies[index] = schema.newProjectName;
16 (0, devkit_1.updateProjectConfiguration)(tree, projectName, project);
17 }
18 }
19 }
20}
21exports.updateImplicitDependencies = updateImplicitDependencies;
22//# sourceMappingURL=update-implicit-dependencies.js.map
\No newline at end of file