typescript

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute added in v0.0.12

func Execute(bundle *compactor.Bundle) error

Execute processor

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(bundle *compactor.Bundle) 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(bundle *compactor.Bundle) error

Optimize processor

func Plugin added in v0.0.4

func Plugin() *compactor.Plugin

Plugin return the compactor plugin instance

func Related(item *compactor.Item) ([]compactor.Related, error)

Related processor

func Resolve added in v0.0.15

func Resolve(path string, item *compactor.Item) (string, error)

Resolve processor

func RunTranspiler added in v0.0.15

func RunTranspiler(data Transpiler) error

RunTranspiler will

Types

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 Transpiler added in v0.0.15

type Transpiler struct {
	File        string
	Content     string
	Options     *TSConfig
	Destination string
}

Transpiler struct

Jump to

Keyboard shortcuts

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