bootstrap

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ManifestPath = "bootstrap/manifest.yml"

Variables

This section is empty.

Functions

This section is empty.

Types

type BootstrapOptions

type BootstrapOptions struct {
	Manifest       Manifest
	SourceDir      string
	DestinationDir string
	Site           string
	Theme          string
	BundleIDs      []string
	RepeatableIDs  []string
}

type Bundle

type Bundle struct {
	ID          string      `yaml:"id"`
	Label       string      `yaml:"label"`
	Description string      `yaml:"description,omitempty"`
	Paths       []string    `yaml:"paths"`
	Recipes     []string    `yaml:"recipes,omitempty"`
	Transforms  []Transform `yaml:"transforms,omitempty"`
}

type Manifest

type Manifest struct {
	Name          string       `yaml:"name,omitempty"`
	BasePaths     []string     `yaml:"base_paths,omitempty"`
	Exclude       []string     `yaml:"exclude,omitempty"`
	GeneratedDirs []string     `yaml:"generated_dirs,omitempty"`
	Bundles       []Bundle     `yaml:"bundles"`
	Recipes       []Recipe     `yaml:"recipes"`
	Repeatables   []Repeatable `yaml:"repeatables"`
}

func LoadManifest

func LoadManifest(root string) (Manifest, error)

type Recipe

type Recipe struct {
	ID                string `yaml:"id"`
	RuntimeIdentifier string `yaml:"runtime_identifier,omitempty"`
	RuntimeImport     string `yaml:"runtime_import,omitempty"`
	RuntimeRegisterAs string `yaml:"runtime_register_as,omitempty"`
	CSSImport         string `yaml:"css_import,omitempty"`
	BuildIdentifier   string `yaml:"build_identifier,omitempty"`
	BuildImport       string `yaml:"build_import,omitempty"`
}

type Repeatable

type Repeatable struct {
	ID          string      `yaml:"id"`
	Label       string      `yaml:"label"`
	Description string      `yaml:"description,omitempty"`
	Paths       []string    `yaml:"paths"`
	Recipes     []string    `yaml:"recipes,omitempty"`
	Transforms  []Transform `yaml:"transforms,omitempty"`
}

type Result

type Result struct {
	Path        string   `json:"path"`
	Site        string   `json:"site"`
	Theme       string   `json:"theme"`
	Bundles     []string `json:"bundles,omitempty"`
	Repeatables []string `json:"repeatables,omitempty"`
}

func BootstrapProject

func BootstrapProject(opts BootstrapOptions) (Result, error)

type Transform

type Transform struct {
	Type  string `yaml:"type"`
	Path  string `yaml:"path"`
	Name  string `yaml:"name,omitempty"`
	Match string `yaml:"match,omitempty"`
}

Jump to

Keyboard shortcuts

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