scripts

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewViewFileScript func(absPath string) (FileScript, error) = nil
View Source
var (
	VERBOSITY = 0
)

Functions

func SetNewViewFileScript

func SetNewViewFileScript(fn func(absPath string) (FileScript, error)) bool

Types

type ControlFileScript

type ControlFileScript struct {
	FileScriptData
}

func NewControlFileScript

func NewControlFileScript(absPath string) (*ControlFileScript, error)

func (*ControlFileScript) Write

func (s *ControlFileScript) Write() (string, error)

type FileBundle

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

func NewFileBundle

func NewFileBundle(cmdDefines map[string]string) *FileBundle

func (*FileBundle) Append

func (b *FileBundle) Append(s FileScript)

func (*FileBundle) EvalTypes

func (b *FileBundle) EvalTypes() error

func (*FileBundle) Finalize

func (b *FileBundle) Finalize() error

func (*FileBundle) InitialTreeShake added in v0.4.1

func (b *FileBundle) InitialTreeShake(entryPoints []FileScript) error

func (*FileBundle) IsEmpty

func (b *FileBundle) IsEmpty() bool

func (*FileBundle) ResolveActivity

func (b *FileBundle) ResolveActivity() error

func (*FileBundle) ResolveDependencies

func (b *FileBundle) ResolveDependencies() error

block recursion

func (*FileBundle) ResolveNames

func (b *FileBundle) ResolveNames() error

func (*FileBundle) UniqueNames

func (b *FileBundle) UniqueNames() error

func (*FileBundle) Walk

func (b *FileBundle) Walk(fn func(scriptPath string, obj interface{}) error) error

func (*FileBundle) Write

func (b *FileBundle) Write() (string, error)

type FileBundleScope

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

func (*FileBundleScope) FriendlyPrototypes

func (bs *FileBundleScope) FriendlyPrototypes() []values.Prototype

func (*FileBundleScope) GetFunction

func (bs *FileBundleScope) GetFunction() *js.Function

func (*FileBundleScope) GetModule

func (bs *FileBundleScope) GetModule(absPath string) (js.Module, error)

func (*FileBundleScope) GetVariable

func (bs *FileBundleScope) GetVariable(name string) (js.Variable, error)

func (*FileBundleScope) HasVariable

func (bs *FileBundleScope) HasVariable(name string) bool

func (*FileBundleScope) IsAsync

func (bs *FileBundleScope) IsAsync() bool

func (*FileBundleScope) IsBreakable

func (bs *FileBundleScope) IsBreakable() bool

func (*FileBundleScope) IsContinueable

func (bs *FileBundleScope) IsContinueable() bool

func (*FileBundleScope) Parent

func (bs *FileBundleScope) Parent() js.Scope

func (*FileBundleScope) SetVariable

func (bs *FileBundleScope) SetVariable(name string, v js.Variable) error

type FileScript

type FileScript interface {
	Script
	ResolveNames(scope js.GlobalScope) error
	EvalTypes() error
	ResolveActivity(usage js.Usage) error
	UniqueEntryPointNames(ns js.Namespace) error
	UniversalNames(ns js.Namespace) error
	UniqueNames(ns js.Namespace) error
	Walk(fn func(p string, obj interface{}) error) error
	Module() js.Module
	Path() string
	Hide()
}

func NewFileScript

func NewFileScript(absPath string, lang files.Lang) (FileScript, error)

type FileScriptData

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

func (*FileScriptData) Dependencies

func (s *FileScriptData) Dependencies() []files.PathLang

func (*FileScriptData) EvalTypes

func (s *FileScriptData) EvalTypes() error

func (*FileScriptData) Hash

func (s *FileScriptData) Hash() string

func (*FileScriptData) Hide added in v0.4.1

func (s *FileScriptData) Hide()

func (*FileScriptData) Module

func (s *FileScriptData) Module() js.Module

func (*FileScriptData) Path

func (s *FileScriptData) Path() string

func (*FileScriptData) ResolveActivity

func (s *FileScriptData) ResolveActivity(usage js.Usage) error

func (*FileScriptData) ResolveNames

func (s *FileScriptData) ResolveNames(scope js.GlobalScope) error

func (*FileScriptData) UniqueEntryPointNames

func (s *FileScriptData) UniqueEntryPointNames(ns js.Namespace) error

func (*FileScriptData) UniqueNames

func (s *FileScriptData) UniqueNames(ns js.Namespace) error

func (*FileScriptData) UniversalNames

func (s *FileScriptData) UniversalNames(ns js.Namespace) error

func (*FileScriptData) Walk

func (s *FileScriptData) Walk(fn func(scriptPath string, obj interface{}) error) error

func (*FileScriptData) Write

func (s *FileScriptData) Write() (string, error)

type FileScriptSorter

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

func NewFileScriptSorter

func NewFileScriptSorter(fs []FileScript) *FileScriptSorter

func (*FileScriptSorter) Len

func (fss *FileScriptSorter) Len() int

func (*FileScriptSorter) Less

func (fss *FileScriptSorter) Less(i, j int) bool

func (*FileScriptSorter) Result

func (fss *FileScriptSorter) Result() []FileScript

func (*FileScriptSorter) Swap

func (fss *FileScriptSorter) Swap(i, j int)

type InitFileScript

type InitFileScript struct {
	FileScriptData
}

func NewInitFileScript

func NewInitFileScript(absPath string) (*InitFileScript, error)

func (*InitFileScript) EvalTypes

func (s *InitFileScript) EvalTypes() error

func (*InitFileScript) UniqueEntryPointNames

func (s *InitFileScript) UniqueEntryPointNames(ns js.Namespace) error

type InlineBundle

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

func NewInlineBundle

func NewInlineBundle() *InlineBundle

func (*InlineBundle) Append

func (b *InlineBundle) Append(s Script)

func (*InlineBundle) Dependencies

func (b *InlineBundle) Dependencies() []files.PathLang

func (*InlineBundle) IsEmpty

func (b *InlineBundle) IsEmpty() bool

func (*InlineBundle) Write

func (b *InlineBundle) Write() (string, error)

type InlineScript

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

func NewInlineScript

func NewInlineScript(content string) (*InlineScript, error)

func (*InlineScript) Dependencies

func (s *InlineScript) Dependencies() []files.PathLang

func (*InlineScript) Write

func (s *InlineScript) Write() (string, error)

type Script

type Script interface {
	Write() (string, error)
	Dependencies() []files.PathLang // src fields in script or call
}

type SrcScript

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

func NewSrcScript

func NewSrcScript(src string) (*SrcScript, error)

func (*SrcScript) Dependencies

func (s *SrcScript) Dependencies() []files.PathLang

func (*SrcScript) Write

func (s *SrcScript) Write() (string, error)

Jump to

Keyboard shortcuts

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