generator

package
v0.0.0-...-d2a39d3 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Successful int = iota
	ConfigurationError
	FileReadError
	SpecificationError
	FileWriteError
)
View Source
const (
	GITHUB_OWNER      = ""
	GITHUB_REPOSITORY = ""
)
View Source
const (
	MDCPackageURL = "https://github.com/material-components/material-components-web/tree/v9.0.0/packages"

	MDCOwner      = "material-components"
	MDCRepository = "material-components-web"
	MDCPath       = "packages"
)

Variables

This section is empty.

Functions

func ReadPackages

func ReadPackages(ctx context.Context, version string) error

Types

type Block

type Block struct {
	Class string
	Tag   string
}

type Component

type Component struct {
	Name  string
	Block Block
	// Elements  []Element
	Modifiers []Modifier
}

type Config

type Config struct {
	Extension string
	InDir     string
	OutDir    string
	Package   string
}

func (*Config) Generate

func (c *Config) Generate() error

type Element

type Element struct {
	Name      string
	Component Component
}

type ExitError

type ExitError struct {
	ExitCode int
	Message  string
}

func (ExitError) Error

func (e ExitError) Error() string

type Generator

type Generator struct {
	Github *Github
}

type Github

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

func DefaultGithub

func DefaultGithub(owner, repository string) *Github

func (*Github) GetTagSha

func (g *Github) GetTagSha(ctx context.Context, tagName string) (string, error)

func (*Github) GetTree

func (g *Github) GetTree(ctx context.Context, sha string) error

func (*Github) ReadLatestRelease

func (g *Github) ReadLatestRelease(ctx context.Context) (string, error)

func (*Github) ReadRelease

func (g *Github) ReadRelease(ctx context.Context, version string) error

type Modifier

type Modifier struct {
	Name    string
	Variant bool
}

type Spec

type Spec struct {
	Name string

	Block     Block
	Elements  []Spec
	Modifiers []string

	Rippled bool
}

Jump to

Keyboard shortcuts

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