Gopher
ASSET MANAGEMENT

Asset bundling

Hugo Pipes can bundle any number of assets together.

Asset files of the same MIME type can be bundled into one resource using resources.Concat which takes two arguments, a target path and a slice of resource objects.

{{ $plugins := resources.Get "js/plugins.js" }}
{{ $global := resources.Get "js/global.js" }}
{{ $js := slice $plugins $global | resources.Concat "js/bundle.js" }}