node

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPackageToPackageJSON

func AddPackageToPackageJSON(pkg *PackageJSON, packageName string, version string)

func AddScriptToPackageJSON

func AddScriptToPackageJSON(pkg *PackageJSON, scriptName string, scriptValue string)

func Build

func Build(dir string, pkg *PackageJSON, packageManager lang.PackageManager) error

func InstallPackage

func InstallPackage(dir string, packageName string, packageManager lang.PackageManager) error

func InstallPackagesJSON

func InstallPackagesJSON(dir string, packageManager lang.PackageManager) error

func SetMainInPackageJSON

func SetMainInPackageJSON(pkg *PackageJSON, mainFile string)

func WritePackageJSON

func WritePackageJSON(path string, pkg *PackageJSON) error

Types

type PackageJSON

type PackageJSON struct {
	Scripts      map[string]string `json:"scripts"`
	Dependencies map[string]string `json:"dependencies"`
	Main         string            `json:"main,omitempty"`
	Other        map[string]interface{}
}

func ParsePackageJSON

func ParsePackageJSON(path string) (*PackageJSON, error)

Jump to

Keyboard shortcuts

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