minifier

package module
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 8 Imported by: 0

README

gofiber-minifier

Introduction

Minify is a HTML5, CSS, and JavaScript minifier implemented as a middleware for Fiber.

Minification is the process of removing all unnecessary characters from code without altering its functionality. This includes the removal of whitespace and comments, which eventually results in more compact file sizes.

Usage

import "github.com/THREATINT/gofiber-minifier/minifier"
app.Use(minifier.New())

Credits

This Fiber middleware is a thin wrapper for Minify by Taco de Wollf.

License

Release under the MIT License.

QA

Codacy Badge

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigDefault = Config{Next: nil, MinifyHTML: true}

Functions

func New

func New(config ...Config) fiber.Handler

Types

type Config

type Config struct {
	Next func(c *fiber.Ctx) bool

	MinifyHTML, MinifyCSS, MinifyJS, MinifyXML bool
}

Jump to

Keyboard shortcuts

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