nodejs

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package nodejs provides the Node.js/TypeScript language plugin for monox.

Index

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) Name

func (p *NodePlugin) Name() string

Name returns the plugin name.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL