Documentation ¶
Index ¶
- Variables
- func Benchmark(start time.Time, message string, alwaysRun ...bool)
- func Bundle(spaPath string) error
- func CheckBenchmarkFlag(flag bool)
- func CheckBundleFlag(flag bool)
- func CheckMinifyFlag(flag bool)
- func CheckVerboseFlag(flag bool)
- func Client(spaPath string, coreFS embed.FS, compilerFS embed.FS) error
- func DataSource(buildPath string, spaPath string, siteConfig readers.SiteConfig) error
- func EjectCopy(destPath string, coreFS embed.FS) error
- func Gopack(buildPath, spaPath, entrypoint string) error
- func GopackDynamic(buildPath string, spaPath string) error
- func Log(message string, alwaysRun ...bool)
- func MediaCopy(buildPath string, spaPath string) error
- func Minify(buildPath string) error
- func NpmDefaults(defaultsNodeModulesFS embed.FS) error
- func StaticCopy(buildPath string) error
- func ThemesClean(tempBuildDir string) error
- func ThemesCopy(theme string, themeOptions readers.ThemeOptions) error
- func ThemesMerge(buildDir string) error
- type OutputCode
Constants ¶
This section is empty.
Variables ¶
var Doreload bool
Doreload and other flags should probably be part of a config accessible across build. It gets set using server flags.
var Local bool
Local is set to true when using dev webserver, otherwise bools default to false.
var Path404 string
Path404 stores path to 404 html fallback for use in local webserver
var SSRctx *v8go.Context
SSRctx is a v8go context for loaded with components needed to render HTML.
var ThemeFs afero.Fs
Virtual filesystem for doing theme builds without writing to disk. var ThemeFs = afero.NewMemMapFs()
Functions ¶
func CheckBenchmarkFlag ¶
func CheckBenchmarkFlag(flag bool)
CheckBenchmarkFlag sets global var if --benchmark flag is passed.
func CheckBundleFlag ¶ added in v0.6.55
func CheckBundleFlag(flag bool)
func CheckMinifyFlag ¶ added in v0.5.5
func CheckMinifyFlag(flag bool)
CheckMinifyFlag sets global var if --minify flag is passed.
func CheckVerboseFlag ¶
func CheckVerboseFlag(flag bool)
CheckVerboseFlag sets global var if --verbose flag is passed.
func DataSource ¶
func DataSource(buildPath string, spaPath string, siteConfig readers.SiteConfig) error
DataSource builds json list from "content/" directory.
func GopackDynamic ¶ added in v0.6.4
Create ESM support for files that don't have static imports in the app
func MediaCopy ¶ added in v0.6.0
MediaCopy does a direct copy of any media files (e.g. images, PDFs).
func NpmDefaults ¶
NpmDefaults creates the node_modules folder with core defaults if it doesn't already exist.
func StaticCopy ¶ added in v0.6.0
StaticCopy does a direct copy of any static assets (e.g. global.css, robots.txt).
func ThemesClean ¶
ThemesClean removes temporary build directory used to compile themes.
func ThemesCopy ¶
func ThemesCopy(theme string, themeOptions readers.ThemeOptions) error
ThemesCopy copies nested themes into a temporary, virtual working directory.
func ThemesMerge ¶
ThemesMerge combines any nested themes with the current project.