buildhelper

package
v0.0.65 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TSGenOnChange

func TSGenOnChange(tasksPath string) error

This should be used when you need to run the TS gen from inside an OnChangeCallback in your Kiruna.DevConfig. Why is this pattern necessary? Because TS is generated from within the dev server, and the dev server is instantiated only once, not every time you save a .go file. So, in order for the types to actually be re-evaluated, we need to run this file as a fresh script every time we save a .go file.

Types

type Helper

type Helper struct {
	Kiruna                                        *kiruna.Kiruna    // REQUIRED
	DevConfig                                     *kiruna.DevConfig // REQUIRED
	FilesToVendor                                 [][2]string
	GetPublicFileMapKeysBuildtimeExcludedPrefixes []string
	GenHook                                       func(MutateStatements) error
	BuildHook                                     func(isDev bool) error
}

func (*Helper) Dev

func (inst *Helper) Dev()

func (*Helper) Gen

func (inst *Helper) Gen()

func (*Helper) ProdBuild

func (inst *Helper) ProdBuild()

func (*Helper) ProdBuildNonGo

func (inst *Helper) ProdBuildNonGo()

func (*Helper) Tasks

func (inst *Helper) Tasks()

type MutateStatements

type MutateStatements func(statements *tsgen.Statements) *tsgen.Statements

If you pass nil to this function, it will return a pointer to a new Statements object. If you pass a pointer to an existing Statements object, it will mutate that object and return it.

Jump to

Keyboard shortcuts

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