summaryrefslogtreecommitdiffstats
path: root/tpl
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-08-05 11:13:49 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-08-06 19:58:41 +0200
commit789ef8c639e4621abd36da530bcb5942ac9297da (patch)
treef225fc3663affc49805f1d309b77b096d40fc8f6 /tpl
parent71931b30b1813b146aaa60f5cdab16c0f9ebebdb (diff)
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
Diffstat (limited to 'tpl')
-rw-r--r--tpl/resources/resources.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tpl/resources/resources.go b/tpl/resources/resources.go
index c9d3275e5..5f375a06b 100644
--- a/tpl/resources/resources.go
+++ b/tpl/resources/resources.go
@@ -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
}