Documentation
¶
Index ¶
Constants ¶
View Source
const ( TsConfigFile = "tsconfig.json" TsFileExt = ".ts" GitIgnoreFile = ".gitignore" PackageJsonFile = "package.json" PackageJsonLockFile = "package-lock.json" NodeModulesDir = "node_modules" DefaultBuildScriptName = "build" DefaultBuildScript = "tsc" DefaultTypescriptVersion = "^4.3.5" )
Variables ¶
This section is empty.
Functions ¶
func SavePackageJson ¶
func SavePackageJson(directory string, config *PackageJson) error
func SaveTsConfig ¶
Types ¶
type CompilerOptions ¶
type CompilerOptions struct {
Target *string `json:"target,omitempty"`
Module *string `json:"module,omitempty"`
OutDir *string `json:"outDir,omitempty"`
RootDir *string `json:"rootDir,omitempty"`
SourceMap *bool `json:"sourceMap,omitempty"`
Strict *bool `json:"strict,omitempty"`
NoImplicitReturns *bool `json:"noImplicitReturns,omitempty"`
NoUnusedLocals *bool `json:"noUnusedLocals,omitempty"`
}
type Npm ¶
type Npm interface {
Build() error
}
func NewNpm ¶
func NewNpm(directory string, packageJson *PackageJson) Npm
type PackageJson ¶
type PackageJson struct {
Name string `json:"name,omitempty"`
Scripts map[string]string `json:"scripts,omitempty"`
DevDependencies map[string]string `json:"devDependencies,omitempty"`
Dependencies map[string]string `json:"dependencies,omitempty"`
Private bool `json:"private,omitempty"`
}
func DefaultPackageJson ¶
func DefaultPackageJson(name string) *PackageJson
func LoadPackageJson ¶
func LoadPackageJson(directory string) (*PackageJson, error)
type TsConfig ¶
type TsConfig struct {
CompilerOptions CompilerOptions `json:"compilerOptions,omitempty"`
CompileOnSave *bool `json:"compileOnSave,omitempty"`
Include []string `json:"include,omitempty"`
Exclude []string `json:"exclude,omitempty"`
Detailed map[string]interface{} `json:"-"` // Rest of the fields should go here.
}
func DefaultTsConfig ¶
func DefaultTsConfig() *TsConfig
func LoadTsConfig ¶
Click to show internal directories.
Click to hide internal directories.