Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Conf struct Conf struct { ConfigFile string // build tasks are relative to this config WorkingDir string // working directory is the base directory of the config file CleanDirs []string // is set, this directory will be deleted with clean Tasks []TaskStruct } // Minify determines whether to minify the styles and scripts Minify bool )
View Source
var ( // VerboseLogging - verbose logging VerboseLogging bool // QuietLogging - no logging QuietLogging bool )
View Source
var OptimiserConfig struct { // contains filtered or unexported fields }
OptimiserConfig is the configuration for the optimiser
Functions ¶
func Clean ¶
func Clean() error
Clean deletes all matching files or directories defined in the yaml config
func WatchSrcDirs ¶
func WatchSrcDirs()
WatchSrcDirs will start a watcher at the highest level of the src directories
Types ¶
type TaskStruct ¶
type TaskStruct struct { Type string // styles, scripts, copy Name string // name of the task Src []string // source files Dist string // dist directory DistFile string // optional merge filename NoSourceMaps bool // optional no SourceMaps (SAS/JS) JSBundle bool // optional bundle JS files (JS) OptimiseImages bool `yaml:"optimise_images"` SVGPrecision int `yaml:"svg_precision"` }
TaskStruct for config
func (TaskStruct) Files ¶
func (t TaskStruct) Files() []FileMap
Files returns all files matching the glob pattern
func (TaskStruct) Process ¶
func (task TaskStruct) Process(fileName string) error
Process the TaskStruct
Click to show internal directories.
Click to hide internal directories.