Documentation
¶
Index ¶
Constants ¶
View Source
const ManifestPath = "bootstrap/manifest.yml"
Variables ¶
This section is empty.
Functions ¶
func PlanPaths ¶ added in v0.2.3
func PlanPaths(opts BootstrapOptions) ([]string, error)
PlanPaths returns the source-relative file paths (forward-slash, sorted) that BootstrapProject would write for the given options. It is used to detect conflicts against an existing directory before any file is written.
Types ¶
type BootstrapOptions ¶
type BootstrapOptions struct {
Manifest Manifest
SourceDir string
DestinationDir string
Site string
Theme string
BundleIDs []string
RepeatableIDs []string
// AllowExisting permits scaffolding into a directory that already exists
// (in-place init). When set, the destination-exists guard is relaxed and
// git is left untouched so an existing repository is preserved.
AllowExisting bool
// SkipPaths holds source-relative file paths (forward-slash) the caller
// chose not to overwrite. Planned files in this set are left as-is.
SkipPaths map[string]struct{}
}
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 ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.