compiler

package
v0.0.0-...-db7fbfe Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(rootDir string, outputPath string, compress, addHeaders bool, extensions map[string]string, ignore []string) error

Types

type Header = string
const (
	HEADER_OK             Header = "HTTP/1.1 200 OK"
	HEADER_GZIP_ENCODING  Header = "Content-Encoding: gzip"
	HEADER_CONTENT_TYPE   Header = "Content-Type: "
	HEADER_CONTENT_LENGTH Header = "Content-Length: "
)
const (
	// text
	HEADER_TXT  Header = "text/plain; charset=utf-8"
	HEADER_HTML Header = "text/html; charset=utf-8"
	HEADER_CSS  Header = "text/css; charset=utf-8"
	HEADER_JS   Header = "text/javascript; charset=utf-8"
	HEADER_JSON Header = "application/json; charset=utf-8"
	// image
	HEADER_PNG  Header = "image/png"
	HEADER_JPG  Header = "image/jpeg"
	HEADER_GIF  Header = "image/gif"
	HEADER_SVG  Header = "image/svg+xml"
	HEADER_WEBP Header = "image/webp"
	// video
	HEADER_WEBM Header = "video/webm"
	HEADER_MP4  Header = "video/mp4"
	// audio
	HEADER_WEBA Header = "audio/weba"
	HEADER_MP3  Header = "audio/mpeg"
	HEADER_OGG  Header = "application/ogg"
	// font
	HEADER_TTF   Header = "font/ttf"
	HEADER_OTF   Header = "font/otf"
	HEADER_WOFF  Header = "font/woff"
	HEADER_WOFF2 Header = "font/woff2"
)

MIME types

Jump to

Keyboard shortcuts

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