transform

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: May 20, 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"
)

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