From 669ada436787311cc5d02dae5b88e60a09adda58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 2 Jan 2019 10:36:12 +0100 Subject: [PATCH] resource: Move resource processors into sub-packages --- hugolib/resource_chain_test.go | 2 +- .../{ => resource_factories}/bundler/bundler.go | 0 resource/{ => resource_factories}/create/create.go | 0 .../integrity/integrity.go | 0 .../{ => resource_transformers}/minifier/minify.go | 0 .../{ => resource_transformers}/postcss/postcss.go | 0 .../templates/execute_as_template.go | 0 .../tocss/scss/client.go | 0 .../tocss/scss/tocss.go | 0 .../tocss/scss/tocss_notavailable.go | 0 tpl/resources/resources.go | 14 +++++++------- 11 files changed, 8 insertions(+), 8 deletions(-) rename resource/{ => resource_factories}/bundler/bundler.go (100%) rename resource/{ => resource_factories}/create/create.go (100%) rename resource/{ => resource_transformers}/integrity/integrity.go (100%) rename resource/{ => resource_transformers}/minifier/minify.go (100%) rename resource/{ => resource_transformers}/postcss/postcss.go (100%) rename resource/{ => resource_transformers}/templates/execute_as_template.go (100%) rename resource/{ => resource_transformers}/tocss/scss/client.go (100%) rename resource/{ => resource_transformers}/tocss/scss/tocss.go (100%) rename resource/{ => resource_transformers}/tocss/scss/tocss_notavailable.go (100%) diff --git a/hugolib/resource_chain_test.go b/hugolib/resource_chain_test.go index 551ac0177..0fe9c70c1 100644 --- a/hugolib/resource_chain_test.go +++ b/hugolib/resource_chain_test.go @@ -25,7 +25,7 @@ import ( "github.com/gohugoio/hugo/hugofs" "github.com/gohugoio/hugo/common/loggers" - "github.com/gohugoio/hugo/resource/tocss/scss" + "github.com/gohugoio/hugo/resource/resource_transformers/tocss/scss" ) func TestSCSSWithIncludePaths(t *testing.T) { diff --git a/resource/bundler/bundler.go b/resource/resource_factories/bundler/bundler.go similarity index 100% rename from resource/bundler/bundler.go rename to resource/resource_factories/bundler/bundler.go diff --git a/resource/create/create.go b/resource/resource_factories/create/create.go similarity index 100% rename from resource/create/create.go rename to resource/resource_factories/create/create.go diff --git a/resource/integrity/integrity.go b/resource/resource_transformers/integrity/integrity.go similarity index 100% rename from resource/integrity/integrity.go rename to resource/resource_transformers/integrity/integrity.go diff --git a/resource/minifier/minify.go b/resource/resource_transformers/minifier/minify.go similarity index 100% rename from resource/minifier/minify.go rename to resource/resource_transformers/minifier/minify.go diff --git a/resource/postcss/postcss.go b/resource/resource_transformers/postcss/postcss.go similarity index 100% rename from resource/postcss/postcss.go rename to resource/resource_transformers/postcss/postcss.go diff --git a/resource/templates/execute_as_template.go b/resource/resource_transformers/templates/execute_as_template.go similarity index 100% rename from resource/templates/execute_as_template.go rename to resource/resource_transformers/templates/execute_as_template.go diff --git a/resource/tocss/scss/client.go b/resource/resource_transformers/tocss/scss/client.go similarity index 100% rename from resource/tocss/scss/client.go rename to resource/resource_transformers/tocss/scss/client.go diff --git a/resource/tocss/scss/tocss.go b/resource/resource_transformers/tocss/scss/tocss.go similarity index 100% rename from resource/tocss/scss/tocss.go rename to resource/resource_transformers/tocss/scss/tocss.go diff --git a/resource/tocss/scss/tocss_notavailable.go b/resource/resource_transformers/tocss/scss/tocss_notavailable.go similarity index 100% rename from resource/tocss/scss/tocss_notavailable.go rename to resource/resource_transformers/tocss/scss/tocss_notavailable.go diff --git a/tpl/resources/resources.go b/tpl/resources/resources.go index a20b2e503..497611b75 100644 --- a/tpl/resources/resources.go +++ b/tpl/resources/resources.go @@ -23,13 +23,13 @@ import ( "github.com/gohugoio/hugo/deps" "github.com/gohugoio/hugo/resource" - "github.com/gohugoio/hugo/resource/bundler" - "github.com/gohugoio/hugo/resource/create" - "github.com/gohugoio/hugo/resource/integrity" - "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" + "github.com/gohugoio/hugo/resource/resource_factories/bundler" + "github.com/gohugoio/hugo/resource/resource_factories/create" + "github.com/gohugoio/hugo/resource/resource_transformers/integrity" + "github.com/gohugoio/hugo/resource/resource_transformers/minifier" + "github.com/gohugoio/hugo/resource/resource_transformers/postcss" + "github.com/gohugoio/hugo/resource/resource_transformers/templates" + "github.com/gohugoio/hugo/resource/resource_transformers/tocss/scss" "github.com/spf13/cast" )