Documentation ¶
Index ¶
- func BuildWASM(mainGo string, out string) error
- func BuildWASMTiny(mainGo string, out string) error
- func CopyDirectory(scrDir, dest string) error
- func CopyFile(source string, target string) error
- func CreateDirIfNotExists(dir string, perm os.FileMode) error
- func ExistsFile(path string) bool
- func ExistsFolder(path string) bool
- func Make(srcDir, distDir string) error
- type Generator
- type HandlerOption
- type MakeServeHandler
- type Manifest
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildWASMTiny ¶
tinygo build -o tiny.wasm -target wasm cmd/main.go
func CopyDirectory ¶
func ExistsFile ¶
func ExistsFolder ¶
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func (*Generator) ProcessDir ¶
type HandlerOption ¶
type HandlerOption func(h *MakeServeHandler) error
func WithHook ¶
func WithHook(fnc func()) HandlerOption
type MakeServeHandler ¶
type MakeServeHandler struct {
// contains filtered or unexported fields
}
func NewMakeServeHandler ¶
func NewMakeServeHandler(src, dist, wasm string, opts ...HandlerOption) (*MakeServeHandler, error)
func (*MakeServeHandler) ServeHTTP ¶
func (h *MakeServeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.