jsutils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Minify

func Minify(opts MinifyOptions) (code []byte, sourceMap []byte, err error)

Minify javascript source code using esbuild (no typescript support).

func Transpile

func Transpile(opts TranspileOptions) (js string, err error)

Types

type MinifyOptions

type MinifyOptions struct {
	SourceCode string
	ES         api.Target
}

type TranspileOptions

type TranspileOptions struct {
	// Src is the typescript source code to be transpiled.
	Src            string
	ModuleName     string
	CompileOptions map[string]any
}

Jump to

Keyboard shortcuts

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