hugo: github.com/gohugoio/hugo/resources/resource_transformers/postcss Index | Files

package postcss

import "github.com/gohugoio/hugo/resources/resource_transformers/postcss"

Index

Package Files

postcss.go

type Client Uses

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

Client is the client used to do PostCSS transformations.

func New Uses

func New(rs *resources.Spec) *Client

New creates a new Client with the given specification.

func (*Client) Process Uses

func (c *Client) Process(res resources.ResourceTransformer, options Options) (resource.Resource, error)

Process transforms the given Resource with the PostCSS processor.

type Options Uses

type Options struct {

    // Set a custom path to look for a config file.
    Config string

    NoMap bool // Disable the default inline sourcemaps

    // Enable inlining of @import statements.
    // Does so recursively, but currently once only per file;
    // that is, it's not possible to import the same file in
    // different scopes (root, media query...)
    // Note that this import routine does not care about the CSS spec,
    // so you can have @import anywhere in the file.
    InlineImports bool

    // Options for when not using a config file
    Use         string // List of postcss plugins to use
    Parser      string //  Custom postcss parser
    Stringifier string // Custom postcss stringifier
    Syntax      string // Custom postcss syntax
}

Some of the options from https://github.com/postcss/postcss-cli

func DecodeOptions Uses

func DecodeOptions(m map[string]interface{}) (opts Options, err error)

Package postcss imports 23 packages (graph) and is imported by 9 packages. Updated 2020-03-11. Refresh now. Tools for package owners.