project

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandAttr

type CommandAttr struct {
	Description       string   `json:"description"`
	Aliases           []string `json:"aliases"`
	Permission        string   `json:"permission"`
	PermissionMessage string   `json:"permission_message"`
	Usage             string   `json:"usage"`
}

type PackageJSON

type PackageJSON struct {
	Name        string                     `json:"name"`
	Version     string                     `json:"version"`
	Author      string                     `json:"author"`
	Website     string                     `json:"website"`
	Commands    map[string]*CommandAttr    `json:"commands"`
	Permissions map[string]*PermissionAttr `json:"permissions"`
}

type PermissionAttr

type PermissionAttr struct {
	Description string          `json:"description"`
	Default     *bool           `json:"default"`
	Children    map[string]bool `json:"children"`
}

type Project

type Project struct {
	Dir string
}

func (*Project) CommandContext

func (p *Project) CommandContext(ctx context.Context, name string, args ...string) *exec.Cmd

CommandContext creates a command that will execute with default settings and within the project directory

func (*Project) PackageJSON

func (p *Project) PackageJSON() (*PackageJSON, error)

PackageJSON reads the package.json file contents from the project directory

Jump to

Keyboard shortcuts

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