Documentation ¶
Index ¶
- func ResolveGlobalImport(mgr string, imp string) (string, error)
- type ExportTable
- type Package
- func (p *Package) ResolveDependency(mgr string, dep string) (pkg *Package, err error)
- func (p *Package) ResolveExport(str string) (out string, err error)
- func (p *Package) ResolveImport(mgr string, imp string) (path string, err error)
- func (p *Package) String() string
- func (pkg *Package) TryEscapeScript(mgr string, scriptName string) (executable string, arguments []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExportTable ¶ added in v0.3.9
type ExportTable struct {
// contains filtered or unexported fields
}
Handles: - "a" - {"a":"b"} - {"a":{"b":"c"}}
func (*ExportTable) Resolve ¶ added in v0.3.9
func (t *ExportTable) Resolve(str string) (out string, ok bool)
func (*ExportTable) UnmarshalJSON ¶ added in v0.3.9
func (t *ExportTable) UnmarshalJSON(data []byte) error
type Package ¶
type Package struct { Root string `json:"-"` Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` Type string `json:"type,omitempty"` Main string `json:"main,omitempty"` Dependencies map[string]string `json:"dependencies,omitempty"` DevDependencies map[string]string `json:"devDependencies,omitempty"` Scripts map[string]string `json:"scripts,omitempty"` Exports ExportTable `json:"exports,omitempty"` Bin ExportTable `json:"bin,omitempty"` }
func ParsePackage ¶
func ResolveGlobalPackage ¶
func (*Package) ResolveDependency ¶
func (*Package) ResolveImport ¶
Click to show internal directories.
Click to hide internal directories.