Documentation
¶
Overview ¶
Package web provides functions for building Cogent Core apps for the web.
Index ¶
Constants ¶
const GoscriptPackage = "github.com/s4wave/goscript/cmd/goscript"
GoscriptPackage is the Go package of the GoScript compiler command.
const JSTags = "purego,noasm,mvmnosrc"
JSTags are the build tags (besides goscript) that apps are built with for the js platform, and that core test js uses. The mvmnosrc tag leaves the standard library sources out of the mvm interpreter (mvmcore), which only runs code using the packages bound to it, so that it adds much less to the bundle.
const TsrsVersion = "0.18.0-ts7.1.0-dev.20260929"
TsrsVersion is the version of tsrs, the TypeScript type checker that goscript test uses, which is that of the package.json of GoScript.
Variables ¶
This section is empty.
Functions ¶
func IsJS ¶ added in v0.5.0
IsJS returns whether the given configuration is building for the js platform, which compiles the app to JavaScript using GoScript (https://github.com/s4wave/goscript) instead of to WebAssembly. Otherwise, the js platform produces the same static website as web.
func Serve ¶
Serve serves the build output directory on the default network address at the config port. Text files and the app bundle are served compressed with gzip, as static site hosts do, so that the download sizes are the same as when deployed.
Types ¶
This section is empty.