mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Add support for minification of final output
Hugo Pipes added minification support for resources fetched via ´resources.Get` and similar. This also adds support for minification of the final output for supported output formats: HTML, XML, SVG, CSS, JavaScript, JSON. To enable, run Hugo with the `--minify` flag: ```bash hugo --minify ``` This commit is also a major spring cleaning of the `transform` package to allow the new minification step fit into that processing chain. Fixes #1251
This commit is contained in:
@@ -23,7 +23,7 @@ import (
|
||||
"github.com/gohugoio/hugo/resource/bundler"
|
||||
"github.com/gohugoio/hugo/resource/create"
|
||||
"github.com/gohugoio/hugo/resource/integrity"
|
||||
"github.com/gohugoio/hugo/resource/minifiers"
|
||||
"github.com/gohugoio/hugo/resource/minifier"
|
||||
"github.com/gohugoio/hugo/resource/postcss"
|
||||
"github.com/gohugoio/hugo/resource/templates"
|
||||
"github.com/gohugoio/hugo/resource/tocss/scss"
|
||||
@@ -42,7 +42,7 @@ func New(deps *deps.Deps) (*Namespace, error) {
|
||||
createClient: create.New(deps.ResourceSpec),
|
||||
bundlerClient: bundler.New(deps.ResourceSpec),
|
||||
integrityClient: integrity.New(deps.ResourceSpec),
|
||||
minifyClient: minifiers.New(deps.ResourceSpec),
|
||||
minifyClient: minifier.New(deps.ResourceSpec),
|
||||
postcssClient: postcss.New(deps.ResourceSpec),
|
||||
templatesClient: templates.New(deps.ResourceSpec, deps.TextTmpl),
|
||||
}, nil
|
||||
@@ -56,7 +56,7 @@ type Namespace struct {
|
||||
bundlerClient *bundler.Client
|
||||
scssClient *scss.Client
|
||||
integrityClient *integrity.Client
|
||||
minifyClient *minifiers.Client
|
||||
minifyClient *minifier.Client
|
||||
postcssClient *postcss.Client
|
||||
templatesClient *templates.Client
|
||||
}
|
||||
|
Reference in New Issue
Block a user