@nx-dotnet/core
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "@nx-dotnet/core", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "generators": "./generators.json", |
@@ -10,7 +10,12 @@ "use strict"; | ||
const client = new core_1.DotNetClient(core_1.dotnetFactory()); | ||
const hostProject = devkit_1.readProjectConfiguration(host, options.project); | ||
const sourceProject = devkit_1.readProjectConfiguration(host, options.reference); | ||
const [hostProjectFile, sourceProjectFile] = yield Promise.all([ | ||
workspace_1.getProjectFileForNxProject(host, options.project), | ||
workspace_1.getProjectFileForNxProject(host, options.reference), | ||
workspace_1.getProjectFileForNxProject(hostProject), | ||
workspace_1.getProjectFileForNxProject(sourceProject), | ||
]); | ||
client.addProjectReference(hostProjectFile, sourceProjectFile); | ||
hostProject.implicitDependencies = hostProject.implicitDependencies || []; | ||
hostProject.implicitDependencies.push(options.reference); | ||
devkit_1.updateProjectConfiguration(host, options.project, hostProject); | ||
yield devkit_1.formatFiles(host); | ||
@@ -17,0 +22,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
import { Tree } from '@nrwl/devkit'; | ||
export declare function getProjectFileForNxProject(tree: Tree, project: string): Promise<string>; | ||
import { ProjectConfiguration } from '@nrwl/devkit'; | ||
export declare function getProjectFileForNxProject(project: ProjectConfiguration): Promise<string>; |
@@ -5,7 +5,6 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const devkit_1 = require("@nrwl/devkit"); | ||
const glob_1 = require("./glob"); | ||
function getProjectFileForNxProject(tree, project) { | ||
function getProjectFileForNxProject(project) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const srcDirectory = devkit_1.readProjectConfiguration(tree, project).sourceRoot; | ||
const srcDirectory = project.sourceRoot; | ||
return glob_1.glob(`${srcDirectory}/**/*.*proj`).then(x => x[0]); | ||
@@ -12,0 +11,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
40574
782