UNPKG

@nx-dotnet/core

Version:

- Have an existing nx workspace. For creating this, see [nrwl's documentation](https://nx.dev/latest/angular/getting-started/nx-setup). - .NET SDK is installed, and `dotnet` is available on the path. For help on this, see [Microsoft's documentation](https

21 lines 1.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = dotnetRunExecutor; const devkit_1 = require("@nx/devkit"); const path_1 = require("path"); const dotnet_1 = require("@nx-dotnet/dotnet"); const utils_1 = require("@nx-dotnet/utils"); let childProcess; function dotnetRunExecutor(options, context, dotnetClient = new dotnet_1.DotNetClient((0, dotnet_1.dotnetFactory)())) { const nxProjectConfiguration = (0, utils_1.getExecutedProjectConfiguration)(context); const cwd = (0, path_1.resolve)(devkit_1.workspaceRoot, nxProjectConfiguration.root); dotnetClient.cwd = cwd; return (0, utils_1.getProjectFileForNxProject)(nxProjectConfiguration).then((project) => runDotnetRun(dotnetClient, (0, path_1.resolve)(devkit_1.workspaceRoot, project), options)); } const runDotnetRun = async (dotnetClient, project, options) => { const { watch, ...commandLineOptions } = options; childProcess = dotnetClient.run(project, watch, commandLineOptions); await (0, utils_1.handleChildProcessPassthrough)(childProcess); return { success: true }; }; //# sourceMappingURL=executor.js.map