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

23 lines 1.19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = default_1; const dotnet_1 = require("@nx-dotnet/dotnet"); const utils_1 = require("@nx-dotnet/utils"); const project_configuration_1 = require("../utils/project-configuration"); const dotnet_add_1 = require("../utils/dotnet-add"); async function default_1(host, options, client = new dotnet_1.DotNetClient((0, dotnet_1.dotnetFactory)())) { const hostProject = await (0, project_configuration_1.readProjectConfiguration)(host, options.project); const sourceProject = await (0, project_configuration_1.readProjectConfiguration)(host, options.reference); let [hostProjectFile, sourceProjectFile] = ['', '']; try { [hostProjectFile, sourceProjectFile] = await Promise.all([ (0, utils_1.getProjectFileForNxProject)(hostProject, host), (0, utils_1.getProjectFileForNxProject)(sourceProject, host), ]); } catch { throw new Error('Unable to find project files to add dependency!'); } (0, dotnet_add_1.runDotnetAddProjectReference)(host, hostProjectFile, sourceProjectFile, client); } //# sourceMappingURL=generator.js.map