1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.setDefaultCollection = void 0;
|
4 | const devkit_1 = require("@nrwl/devkit");
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | function setDefaultCollection(host, collectionName) {
|
15 | const nxJson = (0, devkit_1.readNxJson)(host);
|
16 | nxJson.cli = nxJson.cli || {};
|
17 | const defaultCollection = nxJson.cli.defaultCollection;
|
18 | if (!defaultCollection || defaultCollection === '@nrwl/workspace') {
|
19 | nxJson.cli.defaultCollection = collectionName;
|
20 | }
|
21 | (0, devkit_1.updateNxJson)(host, nxJson);
|
22 | }
|
23 | exports.setDefaultCollection = setDefaultCollection;
|
24 |
|
\ | No newline at end of file |