transform

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertServerJSSource

func ConvertServerJSSource(mode Mode, source, sourcefile, projectRoot string) (string, error)

ConvertServerJSSource converts a single SERVER_JS source in memory.

Types

type Mode

type Mode string

Mode defines the conversion direction.

const (
	ModeGasToTS Mode = "gas-to-ts"
	ModeTSToGas Mode = "ts-to-gas"
)

func ModeFromLabel added in v0.4.0

func ModeFromLabel(label string) Mode

ModeFromLabel converts a manifest label back to a Mode. Unknown labels (including "none") map to the zero Mode.

func (Mode) Label added in v0.4.0

func (m Mode) Label() string

Label returns the human-readable conversion label used in archive manifests and command output ("none" for the zero Mode).

type Result

type Result struct {
	OutDir  string
	Written []string
}

Result summarizes the conversion output.

func Convert

func Convert(opts syncer.Options, outDir string, mode Mode, filter *TargetFilter) (Result, error)

Convert transforms local project files into the specified output directory.

type TargetFilter

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

TargetFilter limits which project-relative paths should be converted.

func NewTargetFilter

func NewTargetFilter(projectRoot string, targets []string) (*TargetFilter, error)

func (*TargetFilter) Empty

func (tf *TargetFilter) Empty() bool

Jump to

Keyboard shortcuts

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