@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
22 lines • 1.1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = runExecutor;
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");
async function runExecutor(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;
const projectFilePath = await (0, utils_1.getProjectFileForNxProject)(nxProjectConfiguration);
options.output = options.output
? (0, path_1.resolve)(devkit_1.workspaceRoot, options.output)
: undefined;
const { publishProfile, extraParameters, ...flags } = options;
dotnetClient.publish((0, path_1.resolve)(devkit_1.workspaceRoot, projectFilePath), flags, publishProfile, extraParameters);
return {
success: true,
};
}
//# sourceMappingURL=executor.js.map