1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.runCommandsSchematic = exports.runCommandsGenerator = void 0;
|
4 | const tslib_1 = require("tslib");
|
5 | const devkit_1 = require("@nrwl/devkit");
|
6 | function runCommandsGenerator(host, schema) {
|
7 | return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
8 | const project = (0, devkit_1.readProjectConfiguration)(host, schema.project);
|
9 | project.targets = project.targets || {};
|
10 | project.targets[schema.name] = {
|
11 | executor: 'nx:run-commands',
|
12 | outputs: schema.outputs
|
13 | ? schema.outputs.split(',').map((s) => s.trim())
|
14 | : [],
|
15 | options: {
|
16 | command: schema.command,
|
17 | cwd: schema.cwd,
|
18 | envFile: schema.envFile,
|
19 | },
|
20 | };
|
21 | (0, devkit_1.updateProjectConfiguration)(host, schema.project, project);
|
22 | yield (0, devkit_1.formatFiles)(host);
|
23 | });
|
24 | }
|
25 | exports.runCommandsGenerator = runCommandsGenerator;
|
26 | exports.default = runCommandsGenerator;
|
27 | exports.runCommandsSchematic = (0, devkit_1.convertNxGenerator)(runCommandsGenerator);
|
28 |
|
\ | No newline at end of file |