Documentation
¶
Overview ¶
Package monorepo detects monorepo/workspace boundaries and reports the repo type along with resolved workspace paths.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manifest ¶ added in v0.5.0
type Manifest struct {
Name string // npm name, Go module path, crate name or python project name
Kind string // "npm", "go", "cargo" or "python"
}
Manifest identifies a package by the name other code imports it with.
func ReadManifest ¶ added in v0.5.0
ReadManifest returns the identity declared in dir, trying package.json, go.mod, Cargo.toml and pyproject.toml in that order. ok is false when none of them names the package.
type Result ¶
type Result struct {
Type string `json:"type"` // "monorepo" or "single"
Tool string `json:"tool"` // e.g. "pnpm", "npm", "yarn", "go-work", "turbo", "nx", "lerna", "cargo", "convention"
Workspaces []string `json:"workspaces"` // relative paths to workspace roots
}
Result holds the detection output for a given root directory.