bundle

package
v0.0.0-...-e9ad91d Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CustomElements = &cobra.Command{
	Use:     "bundle",
	GroupID: "bundle",
	Short:   "Run bundler",
	Long:    "Bundles bundle.js and bundle.css files.",
	Run: func(_ *cobra.Command, _ []string) {

		fmt.Println("Bundling...")
		result := api.Build(api.BuildOptions{
			EntryPoints: []string{"./main.ts"},
			Bundle:      true,
			Outfile:     "./ui/static/bundle.js",
			Write:       true,
		})
		if len(result.Errors) > 0 {
			fmt.Println("Bundler errors: ", result.Errors[0])
			os.Exit(1)
		}
		fmt.Println("Bundling complete!")
	},
}
View Source
var Group = &cobra.Group{
	ID:    "bundle",
	Title: "Bundler",
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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