Documentation ¶
Index ¶
- Variables
- type SassTranspiler
- func (tr *SassTranspiler) FileSystem() afero.Fs
- func (tr *SassTranspiler) GetDest(srcRoot, src, dest string) string
- func (tr *SassTranspiler) GetFiles(dir string) []afero.File
- func (tr *SassTranspiler) IsSassFile(f string) bool
- func (tr *SassTranspiler) Run(source, dest string, files []afero.File, imports []string) error
- func (tr *SassTranspiler) SetFileSystem(fileSystem afero.Fs)
- func (tr *SassTranspiler) SetVerbose(verbose bool)
- func (tr *SassTranspiler) Verbose() bool
- type Transpiler
Constants ¶
This section is empty.
Variables ¶
View Source
var AddImportPath = func(c libsass.Compiler, i []string) error {
return c.Option(libsass.IncludePaths(i))
}
In a variable to make it testable
View Source
var Compile = func(c libsass.Compiler) error {
return c.Run()
}
In a variable to make it testable
View Source
var NewCompiler = func(dst io.Writer, src io.Reader) (libsass.Compiler, error) {
return libsass.New(dst, src)
}
In a variable to make it testable
Functions ¶
This section is empty.
Types ¶
type SassTranspiler ¶
type SassTranspiler struct {
// contains filtered or unexported fields
}
func (*SassTranspiler) FileSystem ¶
func (tr *SassTranspiler) FileSystem() afero.Fs
func (*SassTranspiler) GetDest ¶
func (tr *SassTranspiler) GetDest(srcRoot, src, dest string) string
Generate css destination pathname `srcRoot` is the directory where .scss sources are. (example : /src/scss_root) `src` is the absolute path of a file source. (example : /src/scss_root/menu/menu.scss) `dest` is either the absolute filename of the destination or the root directory of destination
func (*SassTranspiler) GetFiles ¶
func (tr *SassTranspiler) GetFiles(dir string) []afero.File
Fetch all scss files in the directory passed as parameter
func (*SassTranspiler) IsSassFile ¶
func (tr *SassTranspiler) IsSassFile(f string) bool
Test if a file is a .scss or .sass
func (*SassTranspiler) SetFileSystem ¶
func (tr *SassTranspiler) SetFileSystem(fileSystem afero.Fs)
func (*SassTranspiler) SetVerbose ¶
func (tr *SassTranspiler) SetVerbose(verbose bool)
func (*SassTranspiler) Verbose ¶
func (tr *SassTranspiler) Verbose() bool
Click to show internal directories.
Click to hide internal directories.