build

package
v0.4.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Doreload bool

Doreload and other flags should probably be part of a config accessible across build. It gets set using server flags.

View Source
var SSRctx *v8go.Context

SSRctx is a v8go context for loaded with components needed to render HTML.

Functions

func AssetsCopy

func AssetsCopy(buildPath string, tempBuildDir string) error

AssetsCopy does a direct copy of any static assets.

func Benchmark

func Benchmark(start time.Time, message string, alwaysRun ...bool)

Benchmark records time for individual build processes.

func CheckBenchmarkFlag

func CheckBenchmarkFlag(flag bool)

CheckBenchmarkFlag sets global var if --benchmark flag is passed.

func CheckVerboseFlag

func CheckVerboseFlag(flag bool)

CheckVerboseFlag sets global var if --verbose flag is passed.

func Client

func Client(buildPath string, tempBuildDir string, defaultsEjectedFS embed.FS) error

Client builds the SPA.

func DataSource

func DataSource(buildPath string, siteConfig readers.SiteConfig, tempBuildDir string) error

DataSource builds json list from "content/" directory.

func EjectCopy

func EjectCopy(buildPath string, tempBuildDir string, defaultsEjectedFS embed.FS) error

EjectCopy does a direct copy of any ejectable js files needed in spa build dir.

func Gopack

func Gopack(buildPath string) error

Gopack ensures ESM support for NPM dependencies.

func Log

func Log(message string, alwaysRun ...bool)

Log displays verbose info to the terminal for individual build processes.

func NpmDefaults

func NpmDefaults(tempBuildDir string, defaultsNodeModulesFS embed.FS) error

NpmDefaults creates the node_modules folder with core defaults if it doesn't already exist.

func ThemesClean

func ThemesClean(tempBuildDir string) error

ThemesClean removes temporary build directory used to compile themes.

func ThemesCopy

func ThemesCopy(theme string, themeOptions readers.ThemeOptions) (string, error)

ThemesCopy copies nested themes into a temporary working directory.

func ThemesMerge

func ThemesMerge(tempBuildDir string, buildDir string) error

ThemesMerge combines any nested themes with the current project.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL