Documentation ¶
Index ¶
- func Add(extension Extension, processor Processor)
- func ChmodFile(filename string, perm fs.FileMode) error
- func ChownFile(filename string, user int, group int) error
- func CopyFile(source string, destination string) error
- func DeleteFile(filename string) error
- func EnsureDirectory(filename string) error
- func ExecCommand(cmd string, args ...string) (string, error)
- func ExistDirectory(path string) bool
- func ExistFile(filename string) bool
- func FindFiles(root string, names []string) ([]string, error)
- func GetPermission(filename string) (fs.FileMode, error)
- func ListFiles(root string) ([]string, error)
- func MoveFile(source string, destination string) error
- func ReadFile(filename string) (string, error)
- func ReadFileAndPermission(filename string) (string, fs.FileMode, error)
- func ReadFiles(files []string) (string, error)
- func Remove(extension Extension)
- func RenameFile(source string, destination string) error
- func WriteFile(filename string, content string, perm fs.FileMode) error
- type Bundle
- type Compress
- type Context
- type Extension
- type Instance
- type Options
- func (o *Options) CanProcess(item string, include []string, exclude []string) bool
- func (o *Options) GenerateProgressive(context *Context) bool
- func (o *Options) GenerateSourceMap(context *Context) bool
- func (o *Options) ShouldCompress(context *Context) bool
- func (o *Options) ShouldIgnore(context *Context) bool
- func (o *Options) ShouldSkip(context *Context) bool
- type Processor
- type Processors
- type Progressive
- type SourceMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureDirectory ¶
EnsureDirectory makes sure directory exists from file path
func ExistDirectory ¶ added in v0.0.2
ExistDirectory check if directory exists
func GetPermission ¶
GetPermission retrieve file permission from filename
func ReadFileAndPermission ¶
ReadFileAndPermission retrieve file content and permissions from filename
func RenameFile ¶
RenameFile rename a file name
Types ¶
type Context ¶
type Context struct { File string Extension string Path string Source string Destination string Processed bool Skipped bool Ignored bool }
Context struct
type Options ¶
type Options struct { Source string Destination string Development bool Watch bool Compress Compress SourceMap SourceMap Progressive Progressive Bundles []Bundle Include []string Exclude []string Ignore []string }
Options struct
func (*Options) CanProcess ¶ added in v0.0.2
CanProcess check if item can be processed based on include and exclude list
func (*Options) GenerateProgressive ¶ added in v0.0.2
GenerateProgressive return if progressive formats should be generated for given context
func (*Options) GenerateSourceMap ¶ added in v0.0.2
GenerateSourceMap return if source map should be generated for given context
func (*Options) ShouldCompress ¶ added in v0.0.2
ShouldCompress return if compress is enabled for given context
func (*Options) ShouldIgnore ¶ added in v0.0.2
ShouldIgnore return if processing should be ignored for given context
func (*Options) ShouldSkip ¶ added in v0.0.2
ShouldSkip return if processing should be skipped for given context
type Progressive ¶ added in v0.0.2
Compress struct