Documentation
¶
Index ¶
- func Clean(path string) error
- func CopyAssetToBuild(runtime RuntimeConfig, srcName string) error
- func CopyFiles(srcPath, dstPath string) error
- func GetBasePageFiles(runtime RuntimeConfig) []string
- func GetComponentFiles(runtime RuntimeConfig) ([]string, error)
- func GetCurrentEasternTime() string
- func GetCurrentYear() string
- func GetRepoRoot() string
- func MakePath(path string) string
- func Mkdir(path string) error
- func ReadDir(path string) ([]string, error)
- func ReadFile(path string) ([]byte, error)
- func SetupBuild(runtime RuntimeConfig) error
- func WriteFile(path string, b []byte) error
- type RuntimeConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyAssetToBuild ¶
func CopyAssetToBuild(runtime RuntimeConfig, srcName string) error
func GetBasePageFiles ¶
func GetBasePageFiles(runtime RuntimeConfig) []string
GetBasePageFiles returns the list of base page files in the assets directory This is statically defined and does not support subdirectories since these should not change often
func GetComponentFiles ¶
func GetComponentFiles(runtime RuntimeConfig) ([]string, error)
GetComponentFiles returns the list of component files in the assets/components directory
func GetCurrentEasternTime ¶
func GetCurrentEasternTime() string
Returns the current eastern timestamp
func GetRepoRoot ¶
func GetRepoRoot() string
GetRepoRoot returns the root directory of the repository. This value is used to enable consistent relative paths for file copying/creating throughout the templating process
func ReadDir ¶
ReadDir returns the list of files in the directory, including subdirectories starting with path as a relative path from the repo root
func SetupBuild ¶
func SetupBuild(runtime RuntimeConfig) error
SetupBuild generates the directories for the output artifacts and puts assets that do not need processing in the build directory; these assets are referred to by the output artifacts
Types ¶
type RuntimeConfig ¶
type RuntimeConfig struct {
AssetsPath string
ConfigsPath string
BuildPath string
TemplateFuncs template.FuncMap
}
Parameterizes specific values needed to load assets and configuration at runtime
func NewRuntimeConfig ¶
func NewRuntimeConfig() RuntimeConfig