js

package
v0.140.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Overview

Package js provides functions for building JavaScript resources

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Namespace

type Namespace struct {
	// contains filtered or unexported fields
}

Namespace provides template functions for the "js" namespace.

func New

func New(d *deps.Deps) (*Namespace, error)

New returns a new instance of the js-namespaced template functions.

func (*Namespace) Babel added in v0.128.0

func (ns *Namespace) Babel(args ...any) (resource.Resource, error)

Babel processes the given Resource with Babel.

func (*Namespace) Batch added in v0.140.0

func (ns *Namespace) Batch(id string) (js.Batcher, error)

Batch creates a new Batcher with the given ID. Repeated calls with the same ID will return the same Batcher. The ID will be used to name the root directory of the batch. Forward slashes in the ID is allowed.

func (*Namespace) Build

func (ns *Namespace) Build(args ...any) (resource.Resource, error)

Build processes the given Resource with ESBuild.

Jump to

Keyboard shortcuts

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