Versions in this module Expand all Collapse all v0 v0.9.2 Jun 16, 2018 Changes in this version + const COMPACT_STYLE + const COMPRESSED_STYLE + const EXPANDED_STYLE + const NESTED_STYLE + var ErrCompilerNotFound = errors.New("compiler not found") + var ErrImportNotFound = errors.New("Import unreachable or not found") + var ErrNoCompile = errors.New("No compile has occurred") + var ErrPayloadEmpty = errors.New("empty payload") + var ErrSassNumberNoUnit = errors.New("SassNumber has no units") + var Style map[string]int + var TestCallback = testCallback(func(_ interface{}, _ SassValue, _ *SassValue) error { ... }) + func BasePath(basePath string) option + func BuildDir(path string) option + func CacheBust(t string) option + func Comments(b bool) option + func FontDir(path string) option + func HTTPPath(u string) option + func Handler(h HandlerFunc) libs.SassCallback + func ImgBuildDir(path string) option + func ImgDir(path string) option + func ImportsOption(imports *Imports) option + func IncludePaths(includes []string) option + func LineComments(b bool) option + func NewCompilerContext(c Compiler) context.Context + func OutputStyle(style int) option + func Path(path string) option + func Payload(load context.Context) option + func Precision(prec int) option + func RegisterHandler(sign string, callback HandlerFunc) + func RegisterHeader(body string) + func RegisterSassFunc(sign string, fn SassFunc) + func SassHandler(h SassFunc) libs.SassCallback + func SourceMap(b bool, path, sourceMapRoot string) option + func ToScss(r io.Reader, w io.Writer) error + func Unmarshal(arg SassValue, v ...interface{}) error + func Version() string + func WithSyntax(mode Syntax) option + type Compiler interface + CacheBust func() string + Imports func() []string + LineComments func() bool + Option func(...option) error + Payload func() context.Context + Run func() error + Syntax func() Syntax + func CompFromCtx(ctx context.Context) (Compiler, error) + func New(dst io.Writer, src io.Reader, opts ...option) (Compiler, error) + type Func struct + Ctx interface{} + Fn libs.SassCallback + Sign string + type Funcs struct + func NewFuncs(ctx *compctx) *Funcs + func (fs *Funcs) Add(f Func) + func (fs *Funcs) Bind(goopts libs.SassOptions) + func (fs *Funcs) Close() + type HandlerFunc func(v interface{}, req SassValue, res *SassValue) error + type Header struct + Content string + type Headers struct + func NewHeaders() *Headers + func (h *Headers) Add(s string) + func (h *Headers) Has(s string) bool + func (h *Headers) Len() int + func (hdrs *Headers) Bind(opts libs.SassOptions) + func (hdrs *Headers) Close() + type Import struct + Body io.ReadCloser + Path string + Prev string + func (i Import) ModTime() time.Time + type Imports struct + func NewImports() *Imports + func (i *Imports) Close() + func (p *Imports) Add(prev string, path string, bs []byte) error + func (p *Imports) Bind(opts libs.SassOptions) + func (p *Imports) Del(path string) + func (p *Imports) Get(prev, path string) ([]byte, error) + func (p *Imports) Init() + func (p *Imports) Len() int + func (p *Imports) Update(name string) + type Pather interface + BuildDir func() string + FontDir func() string + HTTPPath func() string + ImgBuildDir func() string + ImgDir func() string + type SassError struct + Column int + File string + Line int + Message string + Status int + type SassFunc func(ctx context.Context, in SassValue) (*SassValue, error) + type SassValue struct + func Error(err error) SassValue + func Marshal(v interface{}) (SassValue, error) + func NewSassValue() SassValue + func Warn(s string) SassValue + func (sv SassValue) Val() libs.UnionSassValue + type Syntax int + const SCSSSyntax + const SassSyntax