compiler

package
v0.0.0-...-25eedb4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2016 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_CONCURRENT_COMPILES = 4
)
View Source
const (
	MAX_CONCURRENT_READS = 4
)

Variables

This section is empty.

Functions

func Compile

func Compile(ctx *SassContext)

CLI endpoint for compiling

func Watch

func Watch(ctx *SassContext)

CLI endpoint for watching

Types

type FileCache

type FileCache struct {
	// contains filtered or unexported fields
}

Gets files, storing the contents in-memory for faster future lookups

func NewFileCache

func NewFileCache() *FileCache

func (*FileCache) Get

func (self *FileCache) Get(path string) ([]byte, error)

Gets the given file

func (*FileCache) Invalidate

func (self *FileCache) Invalidate(path string) error

type SassCommand

type SassCommand struct {
	Args []string
}

func NewSassCommand

func NewSassCommand() *SassCommand

func (*SassCommand) AddArgument

func (self *SassCommand) AddArgument(arg string)

func (*SassCommand) Create

func (self *SassCommand) Create(inputFilePath string) *exec.Cmd

type SassContext

type SassContext struct {
	// contains filtered or unexported fields
}

Stores contextual information for CLI invocations

func NewSassContext

func NewSassContext(cmd *SassCommand, inputPath string, outputPath string) *SassContext

func (*SassContext) AddPlugin

func (self *SassContext) AddPlugin(path string)

func (*SassContext) Start

func (self *SassContext) Start()

func (*SassContext) Stop

func (self *SassContext) Stop()

type SassDependencyResolver

type SassDependencyResolver struct {
	// contains filtered or unexported fields
}

func NewSassDependencyResolver

func NewSassDependencyResolver(filecache *FileCache) *SassDependencyResolver

func (*SassDependencyResolver) Invalidate

func (self *SassDependencyResolver) Invalidate(path string) error

Invalidates the cached entry for the given file

func (*SassDependencyResolver) Resolve

func (self *SassDependencyResolver) Resolve(path string) ([]string, error)

Gets all files imported by the given file, including indirect imports

func (*SassDependencyResolver) ReverseResolve

func (self *SassDependencyResolver) ReverseResolve(path string) ([]string, error)

Gets what files are dependent on the given file, including indirectly

type SassWatcher

type SassWatcher struct {
	// contains filtered or unexported fields
}

func NewSassWatcher

func NewSassWatcher(ctx *SassContext) (*SassWatcher, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL