static

package
v0.0.0-...-e863a03 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package static builds static assets for the frontend and the worker.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(config Config) error

Build compiles TypeScript files into minified JavaScript files using github.com/evanw/esbuild.

This function is used in Server.staticHandler with Watch=true when cmd/frontend is run in dev mode and in devtools/cmd/static/main.go with Watch=false for building productionized assets.

Types

type Config

type Config struct {
	// EntryPoint is a directory in which to build TypeScript
	// sources.
	EntryPoint string

	// Bundle is true if files imported by an entry file
	// should be joined together in a single output file.
	Bundle bool

	// Watch is true in development. Sourcemaps are placed inline,
	// the output is unminified, and changes to any TypeScript
	// files will force a rebuild of the JavaScript output.
	Watch bool
}

Jump to

Keyboard shortcuts

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