Resource functions
Use these functions to work with resources.
Use these functions to work with resources.
resources.Babel [OPTIONS] RESOURCE ⟼ resource.ResourceCompiles the given JavaScript resource with Babel. Read More »
resources.ByType MEDIATYPE ⟼ resource.ResourcesReturns a collection of global resources of the given media type, or nil if none found. Read More »
resources.Concat TARGETPATH [RESOURCE...] ⟼ resource.ResourceReturns a concatenated slice of resources. Read More »
resources.Copy TARGETPATH RESOURCE ⟼ resource.ResourceCopies the given resource to the target path. Read More »
resources.ExecuteAsTemplate TARGETPATH CONTEXT RESOURCE ⟼ resource.ResourceReturns a resource created from a Go template, parsed and executed with the given context. Read More »
resources.Fingerprint [ALGORITHM] RESOURCE ⟼ resource.ResourceCryptographically hashes the content of the given resource. Read More »
resources.FromString TARGETPATH STRING ⟼ resource.ResourceReturns a resource created from a string. Read More »
resources.Get PATH ⟼ resource.ResourceReturns a global resource from the given path, or nil if none found. Read More »
resources.GetMatch PATTERN ⟼ resource.ResourceReturns the first global resource from paths matching the given glob pattern, or nil if none found. Read More »
resources.GetRemote URL [OPTIONS] ⟼ resource.ResourceReturns a remote resource from the given URL, or nil if none found. Read More »
resources.Match PATTERN ⟼ resource.ResourcesReturns a collection of global resources from paths matching the given glob pattern, or nil if none found. Read More »
resources.Minify RESOURCE ⟼ resource.ResourceMinifies the given resource. Read More »
resources.PostCSS [OPTIONS] RESOURCE ⟼ resource.ResourceProcesses the given resource with PostCSS using any PostCSS plugin. Read More »
resources.PostProcess RESOURCE ⟼ postpub.PostPublishedResourceProcesses the given resource after the build. Read More »
resources.ToCSS [OPTIONS] RESOURCE ⟼ resource.ResourceTranspiles Sass to CSS. Read More »