Documentation ¶
Index ¶
- func AddPackageToPackageJSON(pkg *PackageJSON, packageName string, version string)
- func AddScriptToPackageJSON(pkg *PackageJSON, scriptName string, scriptValue string)
- func Build(dir string, pkg *PackageJSON, packageManager lang.PackageManager) error
- func InstallPackage(dir string, packageName string, packageManager lang.PackageManager) error
- func InstallPackagesJSON(dir string, packageManager lang.PackageManager) error
- func SetMainInPackageJSON(pkg *PackageJSON, mainFile string)
- func WritePackageJSON(path string, pkg *PackageJSON) error
- type PackageJSON
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)
Click to show internal directories.
Click to hide internal directories.