transformer

package
v0.0.0-...-1efd103 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Transform

func Transform(s *ast.Stylesheet, opts Options) *ast.Stylesheet

Transform takes a pass over the input AST and runs various transforms.

Types

type Options

type Options struct {
	// OriginalSource is used to report error locations.
	// XXX: work even if original source is not passed by having janky errors.
	OriginalSource *sources.Source

	// Reporter is the reporter for errors and warnings.
	Reporter logging.Reporter

	// Options is the set of transform options. Some transforms may need additional context passed in.
	transforms.Options

	// ImportReplacements is the set of import references to inline. ImportReplacements must be non-nil
	// if ImportRules is set to ImportRulesInline.
	ImportReplacements map[*ast.AtRule]*ast.Stylesheet
}

Options is the set of options for transformation.

Jump to

Keyboard shortcuts

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