cssminify

package module
v0.0.0-...-883a0e1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2013 License: MIT Imports: 11 Imported by: 0

README

cssminify

Library to parse and minify CSS files.

Features

  • Removes all comments
  • Removes all unnecessary space
  • Removes unnecessary semicolons
  • Optimizes hexadecimal values
  • Inlines images with their base64 counterpart (local files or web files)

Contributors

License

MIT License.

Documentation

Index

Constants

View Source
const (
	NOT_IN_SELECTOR = "Met { while not being in selector"
	NOT_AFTER_VALUE = "Met } after a non-value"
	NOT_IN_PROPERTY = "Met : after a non-property"
	NOT_IN_VALUE    = "Met ; after a non-value"
)

Error constants

View Source
const (
	STARTING_COMMENT = iota
	IN_COMMENT       = iota
	CLOSING_COMMENT  = iota
	COMMENT_CLOSED   = iota
	IN_SELECTOR      = iota
	IN_PROPERTY      = iota
	IN_VALUE         = iota
)

Parser constants

Variables

This section is empty.

Functions

func CssFiles

func CssFiles(dir string) []string

returns all .css files in the passed directory

func Files

func Files() []string

returns all CSS files in the current directory might in the future also return HTML files to allow inline style minification

func Minify

func Minify(blocks []Block, file string)

Types

type Block

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

func Blocks

func Blocks(file string) []Block

type Pair

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

type State

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

Jump to

Keyboard shortcuts

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