stdlib

package
v0.0.0-...-841f565 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromRoot

func FromRoot(opts Options) func(call goja.FunctionCall) goja.Value

FromRoot returns an absolute path of the given file from the root

func GetFolderNameFromCurrentLocationFunc

func GetFolderNameFromCurrentLocationFunc(opts Options) func(_ goja.Object) goja.Value

GetFolderNameFromCurrentLocationFunc return the folder name of the current file

func GlobFunc

func GlobFunc(opts Options) func(call goja.FunctionCall) goja.Value

GlobFunc returns a goja compatible function that accepts N glob patterns and returns a list of matching files

func JoinFunc

func JoinFunc(opts Options) func(call goja.FunctionCall) goja.Value

JoinFunc joins any number of path elements into a single path, separating them with an OS specific Separator. Empty elements are ignored. The result is Cleaned. However, if the argument list is empty or all its elements are empty, Join returns an empty string.

func LoadAsTemplateFunc

func LoadAsTemplateFunc(opts Options) func(call goja.FunctionCall) goja.Value

LoadAsTemplateFunc creates a new goja compatible function that accepts a filepath and renders a template

func LoadFunc

func LoadFunc(opts Options) func(call goja.FunctionCall) goja.Value

LoadFunc returns a goja compatible function that loads the contents of a file as a string

func NewAddTargetFunc

func NewAddTargetFunc(targetType string, opts Options) func(call goja.FunctionCall) goja.Value

NewAddTargetFunc adds a new target

func NewArkActionLibrary

func NewArkActionLibrary(opts Options) typescript.Module

NewArkActionLibrary register all TS-Golang mappings

func NewConnectTargetFunc

func NewConnectTargetFunc(opts Options) func(call goja.FunctionCall) goja.Value

NewConnectTargetFunc connects to a target function

func NewEncodingLibrary

func NewEncodingLibrary(opts EncodingLibraryOptions) typescript.Module

NewEncodingLibrary register all TS-Golang mappings

func NewFilepathLibrary

func NewFilepathLibrary(opts Options) typescript.Module

NewFilepathLibrary creates a module of goja functions for the filepath library

func NewKvLibrary

func NewKvLibrary(opts KvLibraryOptions) typescript.Module

NewKvLibrary register all TS-Golang mappings

Types

type Client

type Client interface {
	AddTarget(target ark.RawTarget) (ark.RawArtifact, error)
	GetTargets() ([]ark.RawTarget, error)
	ConnectTargets(edge ark.GraphEdge) (ark.GraphEdge, error)
	GetGraph() (*dag.AcyclicGraph, error)
	GetGraphEdges() ([]ark.GraphEdge, error)
}

type EncodingLibraryOptions

type EncodingLibraryOptions struct {
	Runtime *goja.Runtime
}

EncodingLibraryOptions input type for NewEncodingLibrary factory

type KvLibraryOptions

type KvLibraryOptions struct {
	KVStorage kv.Storage
	Runtime   *goja.Runtime
}

KvLibraryOptions input type for NewKvLibrary factory

type Options

type Options struct {
	FSRealm        string
	Client         Client
	Runtime        *goja.Runtime
	GitIgnore      gitignore.Matcher
	WatchmanClient *watchman.Client
}

Jump to

Keyboard shortcuts

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