bundler

package
v0.0.0-...-4287e6e Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultExtensionToLoaderMap

func DefaultExtensionToLoaderMap() map[string]Loader

Types

type Bundle

type Bundle struct {
	// contains filtered or unexported fields
}

func ScanBundle

func ScanBundle(
	log logging.Log, fs fs.FS, res resolver.Resolver, entryPaths []string,
	parseOptions parser.ParseOptions, bundleOptions BundleOptions,
) Bundle

func (*Bundle) Compile

func (b *Bundle) Compile(log logging.Log, options BundleOptions) []BundleResult

type BundleOptions

type BundleOptions struct {
	Bundle            bool
	AbsOutputFile     string
	AbsOutputDir      string
	RemoveWhitespace  bool
	MinifyIdentifiers bool
	MangleSyntax      bool
	SourceMap         bool
	ModuleName        string
	ExtensionToLoader map[string]Loader
	// contains filtered or unexported fields
}

type BundleResult

type BundleResult struct {
	JsAbsPath         string
	JsContents        []byte
	SourceMapAbsPath  string
	SourceMapContents []byte
}

type Loader

type Loader int
const (
	LoaderNone Loader = iota
	LoaderJS
	LoaderJSX
	LoaderJSON
	LoaderText
	LoaderBase64
)

Jump to

Keyboard shortcuts

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