v0.2.1 Latest Latest

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 12 Imported by: 0




This section is empty.


This section is empty.


func FindConfig added in v0.0.11

func FindConfig(path string) string

FindConfig locate the user defined TypeScript config file

func FindRealPath added in v0.0.15

func FindRealPath(path string) string

FindRealPath transform TSConfig paths into real path values

func Init added in v0.0.12

func Init(options *compactor.Options) error

Init processor

func InitConfig added in v0.0.15

func InitConfig(path string) error

InitConfig find and read tsconfig file from given path

func Optimize added in v0.0.12

func Optimize(options *compactor.Options, file *compactor.File) error

Optimize processor

func Plugin added in v0.0.4

func Plugin() *compactor.Plugin

Plugin return the compactor plugin instance

func Related(options *compactor.Options, file *compactor.File) ([]compactor.Related, error)

Related processor

func Resolve added in v0.0.15

func Resolve(options *compactor.Options, file *compactor.File) (string, error)

Resolve processor

func Shutdown added in v0.2.0

func Shutdown(options *compactor.Options) error

Shutdown processor

func Transform added in v0.1.0

func Transform(options *compactor.Options, file *compactor.File) error

Transform processor


type TSConfig added in v0.0.11

type TSConfig struct {
	CompilerOptions map[string]interface{} `json:"compilerOptions,omitempty"`
	WatchOptions    map[string]interface{} `json:"watchOptions,omitempty"`
	TypeAcquisition map[string]interface{} `json:"typeAcquisition,omitempty"`
	Exclude         []string               `json:"exclude,omitempty"`
	Extends         string                 `json:"extends,omitempty"`
	Files           []string               `json:"files,omitempty"`
	Include         []string               `json:"include,omitempty"`
	References      []string               `json:"references,omitempty"`

TSConfig struct

func ReadConfig added in v0.0.15

func ReadConfig(path string) (*TSConfig, error)

ReadConfig data from config file if exists

type TranspilerService added in v0.2.0

type TranspilerService struct {
	File    string
	Port    string
	Address string
	Cmd     *exec.Cmd

func (*TranspilerService) Execute added in v0.2.0

func (service *TranspilerService) Execute(config *TSConfig, file *compactor.File) error

Execute transpilation process

func (*TranspilerService) Init added in v0.2.0

func (service *TranspilerService) Init() error

Init service to handle transpilation requests

func (*TranspilerService) Shutdown added in v0.2.0

func (service *TranspilerService) Shutdown() error

Shutdown transpilation service

Jump to

Keyboard shortcuts

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