Documentation
¶
Index ¶
- Variables
- func ChildProcess(vm *goja.Runtime, module *goja.Object)
- func Console(vm *goja.Runtime, module *goja.Object)
- func FS(vm *goja.Runtime, module *goja.Object)
- func GetDataFromMetadata(key string) (string, error)
- func LoadEnvWithPrefix(baseDir string) map[string]string
- func NewRuntime() *goja.Runtime
- func OS(vm *goja.Runtime, module *goja.Object)
- func Path(vm *goja.Runtime, module *goja.Object)
- func Prasmoid(vm *goja.Runtime, module *goja.Object)
- func Process(vm *goja.Runtime, module *goja.Object)
- func Register(vm *goja.Runtime, name string, ...)
- func SetObjProperty(obj *goja.Object, key string, value interface{})
- type CommandConfig
- type CommandFlag
Constants ¶
This section is empty.
Variables ¶
var EventLoop = &sync.WaitGroup{}
Global wait group to manage the event loop
Functions ¶
func Console ¶
console provides console.log, console.warn, console.error, console.debug, console.info, console.red, console.green, console.yellow, console.color.
console.log, console.warn, console.error, console.debug, console.info are plain loggers.
console.red, console.green, console.yellow are colored loggers.
console.color is a flexible color logger. It takes multiple arguments where the last argument is the color name and the rest of the arguments are the text parts.
Example: console.color("This is a", "red", " warning!")
func GetDataFromMetadata ¶
Get metadata from metadata.json
func LoadEnvWithPrefix ¶
func NewRuntime ¶
func SetObjProperty ¶ added in v0.0.4
Types ¶
type CommandConfig ¶
type CommandConfig struct {
Run goja.Callable `json:"-"`
Short string `json:"short"`
Long string `json:"long"`
Alias []string `json:"alias"`
Flags []CommandFlag `json:"flags"`
}
CommandConfig represents the configuration for a command
var CommandStorage CommandConfig
CommandStorage stores the command configuration globally