action

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddProject

func AddProject(cfg *core.Config, name string) error

AddProject adds a new project to the current StylesPath.

func EditProject

func EditProject(cfg *core.Config, args []string) error

EditProject renames a project from the current StylesPath.

func GetLibrary

func GetLibrary(config *core.Config) error

GetLibrary returns the latest style library.

func GetTemplate

func GetTemplate(name string) error

GetTemplate prints tamplate for the given extension point.

func GetVocab

func GetVocab(config *core.Config, args []string) error

GetVocab extracts a vocab file for a project.

func InstallStyle

func InstallStyle(config *core.Config, args []string) error

InstallStyle installs the given style using its download link.

func ListConfig

func ListConfig(config *core.Config, path string) error

ListConfig prints Vale's active configuration.

func ListDir

func ListDir(config *core.Config, path string) error

ListDir prints all folders on the current StylesPath.

func RemoveProject

func RemoveProject(cfg *core.Config, name string) error

RemoveProject deletes a project from the current StylesPath.

func UpdateVocab

func UpdateVocab(config *core.Config, args []string) error

UpdateVocab updates a vocab file for the given project.

Types

type Meta

type Meta struct {
	Author      string   `json:"author"`
	Coverage    float64  `json:"coverage"`
	Description string   `json:"description"`
	Email       string   `json:"email"`
	Feed        string   `json:"feed"`
	Lang        string   `json:"lang"`
	License     string   `json:"license"`
	Name        string   `json:"name"`
	Sources     []string `json:"sources"`
	URL         string   `json:"url"`
	Vale        string   `json:"vale_version"`
	Version     string   `json:"version"`
}

Meta represents an installed style's meta data.

type Style

type Style struct {
	// User-provided fields.
	Author      string `json:"author"`
	Description string `json:"description"`
	Feed        string `json:"feed"`
	Homepage    string `json:"homepage"`
	Name        string `json:"name"`
	URL         string `json:"url"`

	// Generated fields.
	HasUpdate bool `json:"has_update"`
	InLibrary bool `json:"in_library"`
	Installed bool `json:"installed"`
}

Style represents an externally-hosted style.

Jump to

Keyboard shortcuts

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