 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
- func MakeJsLanguage(cfg *Config) (language.Language, error)
- type CompilerOptions
- type Config
- type ExportsCacheKey
- type Language
- func (l *Language) ParseExports(file *language.FileInfo) (*language.ExportsEntries, error)
- func (l *Language) ParseFile(id string) (*language.FileInfo, error)
- func (l *Language) ParseImports(file *language.FileInfo) (*language.ImportsResult, error)
- func (l *Language) ResolvePath(unresolved string, dir string) (string, error)
 
- type TsConfig
- type Workspaces
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
    var Extensions = []string{
	"js", "ts", "tsx", "jsx", "d.ts", "mjs", "cjs",
}
    
      View Source
      
  
var NewWorkspaces = utils.Cached1In1OutErr(func(searchPath string) (*Workspaces, error) { searchPath, err := filepath.Abs(searchPath) if err != nil { return nil, err } rootPackageJson, err := searchFirstPackageJsonWithWorkspaces(searchPath) if err != nil { return nil, err } if rootPackageJson == nil { return nil, nil } dirsWithAPackageJson, err := allDirsWithAPackageJson(rootPackageJson.absPath) workspacesMap := map[string]*packageJson{} for _, dir := range dirsWithAPackageJson { for _, ws := range rootPackageJson.workspaces() { rel, _ := filepath.Rel(rootPackageJson.absPath, dir) match, err := utils.GlobstarMatch(ws, rel) if err != nil { return nil, err } if match { pkgJson, err := readPackageJson(dir) if err != nil { return nil, err } workspacesMap[pkgJson.Name] = pkgJson } } } return &Workspaces{ws: workspacesMap}, nil })
Functions ¶
Types ¶
type CompilerOptions ¶
type ExportsCacheKey ¶
type ExportsCacheKey string
type Language ¶
type Language struct {
	Cfg *Config
}
    func (*Language) ParseExports ¶
func (*Language) ParseImports ¶
type TsConfig ¶
type TsConfig struct {
	CompilerOptions CompilerOptions `json:"compilerOptions,omitempty"`
	// contains filtered or unexported fields
}
    func ParseTsConfig ¶
func (*TsConfig) ResolveFromBaseUrl ¶ added in v0.17.4
type Workspaces ¶ added in v0.17.4
type Workspaces struct {
	// contains filtered or unexported fields
}
    func (*Workspaces) ResolveFromWorkspaces ¶ added in v0.17.4
func (w *Workspaces) ResolveFromWorkspaces(unresolved string) (string, error)
       Source Files
      ¶
      Source Files
      ¶
    
   Click to show internal directories. 
   Click to hide internal directories.