Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl
build-project-path.ts783 B
import { join } from 'path'; import { fileExists } from './file-exists'; /** * Builds the project path from the given project name. * @param workspacePath The full path to the configured workspace * @param projectPath The path to the project relative to the workspace * @returns The full path to the project.json file */ export async function buildProjectPath( workspacePath: string, projectPath: string, ): Promise<string | undefined> { const basePath = join(workspacePath, projectPath); const projectJsonPath = join(basePath, 'project.json'); const packageJsonPath = join(basePath, 'package.json'); if (await fileExists(projectJsonPath)) { return projectJsonPath; } else if (await fileExists(packageJsonPath)) { return packageJsonPath; } return; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nrwl/nx-console'

If you have feedback or need assistance with the MCP directory API, please join our Discord server