Documentation
¶
Overview ¶
Package npmc ...
Package npmc ...
Package npmc ...
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteToFile ¶
func WriteToFile(appFS afero.Fs, pkg *PackageJson, saveAs string, prefix string, indent string) error
WriteToFile saves a json string to a file on the file system
Types ¶
type Bugs ¶
type Bugs struct {
URL string `json:"url"`
}
Bugs is a struct representing the bugs section of a package.json file
type Dependency ¶
Dependency is a map representing the bugs section of a package.json file
type NPMClientInfoStr ¶
type NPMClientInfoStr string
NPMClientInfoStr is an alias for string
func (NPMClientInfoStr) ToNPMClient ¶
func (s NPMClientInfoStr) ToNPMClient() NPMClient
ToNPMClient takes an NPMClientInfoStr string alias and returns the relative NPMClient struct
type PackageJson ¶
type PackageJson struct { Name string `json:"name"` Version string `json:"version"` Description string `json:"description"` Author string `json:"author"` License string `json:"license"` Keywords []string `json:"keywords"` Private bool `json:"private"` PackageManager string `json:"packageManager"` PublishConfig PublishConfig `json:"publishConfig"` Engines Engine `json:"engines"` Workspace []string `json:"workspace"` Scripts Script `json:"scripts"` DevDependencies Dependency `json:"devDependencies"` Dependencies Dependency `json:"dependencies"` Homepage string `json:"homepage"` Repository Repository `json:"repository"` Bugs Bugs `json:"bugs"` Type string `json:"type"` }
PackageJson is a struct representing a package.json file
func Parse ¶
func Parse(content []byte) *PackageJson
Parse parses the JSON-encoded data and stores the result in the value pointed to by v.
type PublishConfig ¶
PublishConfig is a map representing the bugs section of a package.json file
type Repository ¶
Repository is a struct representing the bugs section of a package.json file