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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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