ast

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractImports

func ExtractImports(metafileJSON string) ([]string, error)

ExtractImports parses the metafile JSON and returns a unique list of "go:*" imports It filters out core internal modules (fmt, os, sync, net/http, memory, crypto) leaving only the external ones that need shimming/installing.

func ParseFile

func ParseFile(path string) (*api.BuildResult, string, error)

ParseFile parses a TypeScript/JavaScript file and returns its AST

Types

type ImportInfo

type ImportInfo struct {
	Path string `json:"path"`
}

type InputFile

type InputFile struct {
	Imports []ImportInfo `json:"imports"`
}

type Metafile

type Metafile struct {
	Inputs map[string]InputFile `json:"inputs"`
}

Metafile structure matches esbuild's JSON output subset

Jump to

Keyboard shortcuts

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