Documentation ¶
Index ¶
Constants ¶
View Source
const (
// esm.sh build version
VERSION = 78
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuildOutput ¶
type BuildOutput struct {
// contains filtered or unexported fields
}
type BuildQueue ¶
type BuildQueue struct {
// contains filtered or unexported fields
}
A Queue for esbuild
func (*BuildQueue) Add ¶
func (q *BuildQueue) Add(task *BuildTask) *BuildQueueConsumer
Add adds a new build task.
func (*BuildQueue) Len ¶
func (q *BuildQueue) Len() int
Len returns the number of tasks of the queue.
func (*BuildQueue) RemoveConsumer ¶
func (q *BuildQueue) RemoveConsumer(task *BuildTask, c *BuildQueueConsumer)
type BuildQueueConsumer ¶
type BuildQueueConsumer struct {
C chan BuildOutput
}
type BuildTask ¶
type BuildTask struct { CdnOrigin string `json:"cdnOrigin"` BuildVersion int `json:"buildVersion"` Pkg Pkg `json:"pkg"` Alias map[string]string `json:"alias"` Deps PkgSlice `json:"deps"` Target string `json:"target"` BundleMode bool `json:"bundle"` NoRequire bool `json:"noRequire"` DevMode bool `json:"dev"` // contains filtered or unexported fields }
func (*BuildTask) Build ¶
func (task *BuildTask) Build() (esm *ModuleMeta, err error)
type ModuleMeta ¶
type ModuleMeta struct { Exports []string `json:"-"` ExportDefault bool `json:"d"` CJS bool `json:"c"` TypesOnly bool `json:"o"` Dts string `json:"t"` PackageCSS bool `json:"s"` }
ESM defines the ES Module meta
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node defines the nodejs info
type NpmPackage ¶
type NpmPackage struct { Name string `json:"name"` Version string `json:"version"` Main string `json:"main,omitempty"` Module string `json:"module,omitempty"` JsnextMain string `json:"jsnext:main,omitempty"` Es2015 string `json:"es2015,omitempty"` Type string `json:"type,omitempty"` Types string `json:"types,omitempty"` Typings string `json:"typings,omitempty"` Dependencies map[string]string `json:"dependencies,omitempty"` PeerDependencies map[string]string `json:"peerDependencies,omitempty"` DefinedExports interface{} `json:"exports,omitempty"` }
NpmPackage defines the package.json of npm
type NpmPackageVerions ¶
type NpmPackageVerions struct { DistTags map[string]string `json:"dist-tags"` Versions map[string]NpmPackage `json:"versions"` }
NpmPackageVerions defines versions of a npm package
type OldMeta ¶
type OldMeta struct { *NpmPackage ExportDefault bool `json:"exportDefault"` Exports []string `json:"exports"` Dts string `json:"dts"` PackageCSS bool `json:"packageCSS"` }
type Pkg ¶
type Pkg struct { Name string `json:"name"` Version string `json:"version"` Submodule string `json:"submodule"` }
func (Pkg) ImportPath ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.