Documentation
¶
Overview ¶
Package nodejs provides the Node.js/TypeScript language plugin for monox.
Index ¶
- type NodePlugin
- func (p *NodePlugin) DetectProject(path string) bool
- func (p *NodePlugin) GetDefaultTasks(project *api.Project) []api.Task
- func (p *NodePlugin) GetDependencies(ctx context.Context, project *api.Project, workspaceRoot string) ([]api.Dependency, error)
- func (p *NodePlugin) InferProjectConfig(projectPath string, workspaceRoot string) (*api.Project, error)
- func (p *NodePlugin) Name() string
- func (p *NodePlugin) ValidateProject(project *api.Project, workspaceRoot string) []error
- type PackageJSON
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodePlugin ¶
type NodePlugin struct{}
NodePlugin implements the LanguagePlugin interface for Node.js/TypeScript.
func (*NodePlugin) DetectProject ¶
func (p *NodePlugin) DetectProject(path string) bool
DetectProject checks if a directory contains a Node.js project.
func (*NodePlugin) GetDefaultTasks ¶
func (p *NodePlugin) GetDefaultTasks(project *api.Project) []api.Task
GetDefaultTasks returns default tasks for Node.js projects.
func (*NodePlugin) GetDependencies ¶
func (p *NodePlugin) GetDependencies(ctx context.Context, project *api.Project, workspaceRoot string) ([]api.Dependency, error)
GetDependencies extracts dependencies from a Node.js project.
func (*NodePlugin) InferProjectConfig ¶
func (p *NodePlugin) InferProjectConfig(projectPath string, workspaceRoot string) (*api.Project, error)
InferProjectConfig infers project configuration from the filesystem.
func (*NodePlugin) ValidateProject ¶
func (p *NodePlugin) ValidateProject(project *api.Project, workspaceRoot string) []error
ValidateProject validates a Node.js project configuration.
type PackageJSON ¶
type PackageJSON struct {
Name string `json:"name"`
Version string `json:"version"`
Main string `json:"main"`
Module string `json:"module"`
Types string `json:"types"`
Scripts map[string]string `json:"scripts"`
Dependencies map[string]string `json:"dependencies"`
DevDependencies map[string]string `json:"devDependencies"`
PeerDeps map[string]string `json:"peerDependencies"`
Workspaces interface{} `json:"workspaces"`
}
PackageJSON represents the package.json structure.
Click to show internal directories.
Click to hide internal directories.