devmode

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package devmode updates the generated *_templ.go file to work better with a third-party build systems and file watchers. It does this by not relying on environment variables and not modifying the Go file if it's just a text change.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Transform

func Transform(path string, src []byte) ([]byte, error)

Transform turns the generated _templ.go file into a file that works better with a file watcher.

Types

type Transformer

type Transformer struct {
	// Runtime is the import path for the templdev package.
	Runtime string
}

Transformer for devmode

func (*Transformer) Transform

func (t *Transformer) Transform(path string, src []byte) ([]byte, error)

Transform turns the generated _templ.go file into a file that works better with a file watcher.

Jump to

Keyboard shortcuts

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