1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.updatePackageJson = void 0;
|
4 | const devkit_1 = require("@nrwl/devkit");
|
5 | const path = require("path");
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | function updatePackageJson(tree, schema) {
|
12 | const packageJsonPath = path.join(schema.relativeToRootDestination, 'package.json');
|
13 | if (!tree.exists(packageJsonPath)) {
|
14 |
|
15 | return;
|
16 | }
|
17 | const packageJson = (0, devkit_1.readJson)(tree, packageJsonPath);
|
18 | packageJson.name = schema.importPath;
|
19 | tree.write(packageJsonPath, JSON.stringify(packageJson));
|
20 | }
|
21 | exports.updatePackageJson = updatePackageJson;
|
22 |
|
\ | No newline at end of file |