resolver

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNonModulePath

func IsNonModulePath(path string) bool

Types

type Platform

type Platform uint8
const (
	PlatformBrowser Platform = iota
	PlatformNode
)

type ResolveOptions

type ResolveOptions struct {
	ExtensionOrder  []string
	Platform        Platform
	ExternalModules map[string]bool
}

type ResolveStatus

type ResolveStatus uint8
const (
	ResolveMissing ResolveStatus = iota
	ResolveEnabled
	ResolveDisabled
	ResolveExternal
)

type Resolver

type Resolver interface {
	Resolve(sourcePath string, importPath string) (string, ResolveStatus)
	Read(path string) (string, bool)
	PrettyPath(path string) string
}

func NewResolver

func NewResolver(fs fs.FS, log logging.Log, options ResolveOptions) Resolver

Jump to

Keyboard shortcuts

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