1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const tslib_1 = require("tslib");
|
4 | const devkit_1 = require("@nrwl/devkit");
|
5 | function update(host) {
|
6 | return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
7 | const nxJson = (0, devkit_1.readJson)(host, 'nx.json');
|
8 |
|
9 | if (nxJson.projects) {
|
10 | Object.entries(nxJson.projects).forEach(([p, nxJsonConfig]) => {
|
11 | var _a, _b;
|
12 | const configuration = (0, devkit_1.readProjectConfiguration)(host, p);
|
13 | (_a = configuration.tags) !== null && _a !== void 0 ? _a : (configuration.tags = nxJsonConfig.tags);
|
14 | (_b = configuration.implicitDependencies) !== null && _b !== void 0 ? _b : (configuration.implicitDependencies = nxJsonConfig.implicitDependencies);
|
15 | (0, devkit_1.updateProjectConfiguration)(host, p, configuration);
|
16 | });
|
17 | delete nxJson.projects;
|
18 | }
|
19 | (0, devkit_1.writeJson)(host, 'nx.json', nxJson);
|
20 | yield (0, devkit_1.formatFiles)(host);
|
21 | });
|
22 | }
|
23 | exports.default = update;
|
24 |
|
\ | No newline at end of file |