builder

package
v1.0.24-41d39ae Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package builder minifies HTML, CSS and JS files from a source directory into a destination directory, copying all other files as-is.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(srcDir, distDir string, logger *zap.Logger) error

Build walks srcDir, minifying HTML, CSS and JS files and copying all other files into distDir, then logs a summary of the run. Files are processed concurrently, one worker per CPU.

Types

type Stats

type Stats struct {
	TotalFiles     int
	ProcessedFiles int
	TotalSaved     int64
	OriginalSize   int64
	TotalReduction float64
	// contains filtered or unexported fields
}

Stats holds aggregate results of a build run. The mutex guards the fields updated by concurrent build workers.

Jump to

Keyboard shortcuts

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