1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.moveProjectConfiguration = void 0;
|
4 | const devkit_1 = require("@nrwl/devkit");
|
5 | function moveProjectConfiguration(tree, schema, projectConfig) {
|
6 | if (projectConfig.name) {
|
7 | projectConfig.name = schema.newProjectName;
|
8 | }
|
9 | const isStandalone = (0, devkit_1.isStandaloneProject)(tree, schema.projectName);
|
10 | const projectString = JSON.stringify(projectConfig);
|
11 | const newProjectString = projectString.replace(new RegExp(projectConfig.root, 'g'), schema.relativeToRootDestination);
|
12 |
|
13 | const newProject = JSON.parse(newProjectString);
|
14 |
|
15 | (0, devkit_1.removeProjectConfiguration)(tree, schema.projectName);
|
16 |
|
17 | (0, devkit_1.addProjectConfiguration)(tree, schema.newProjectName, newProject, isStandalone);
|
18 | }
|
19 | exports.moveProjectConfiguration = moveProjectConfiguration;
|
20 |
|
\ | No newline at end of file |