Documentation
¶
Index ¶
- func IsTestFile(filePath string) bool
- func ParseSvelteImports(sourceCode []byte) ([]javascript.JavaScriptImport, error)
- func ResolveSvelteImportPath(sourceFile, importPath string, suppliedFiles map[string]bool) []string
- func ResolveSvelteProjectImports(absPath string, filePath string, suppliedFiles map[string]bool, ...) ([]string, error)
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTestFile ¶
IsTestFile reports whether the given Svelte file path is a test file.
func ParseSvelteImports ¶
func ParseSvelteImports(sourceCode []byte) ([]javascript.JavaScriptImport, error)
ParseSvelteImports parses a Svelte file and extracts JavaScript imports from its <script> blocks.
func ResolveSvelteImportPath ¶
ResolveSvelteImportPath resolves a Svelte import path to possible file paths. Svelte scripts can be JavaScript or TypeScript, so extensionless imports need both JS/JSX and TS/TSX candidates before falling back to .svelte.
Types ¶
type Provider ¶ added in v0.27.0
type Provider struct{}
func (Provider) Extensions ¶ added in v0.27.0
func (Provider) IsTestFile ¶ added in v0.27.0
func (Provider) IsTestFile(filePath string, _ vcs.ContentReader) bool
func (Provider) Maturity ¶ added in v0.27.0
func (Provider) Maturity() moduleapi.MaturityLevel
func (Provider) NewResolver ¶ added in v0.27.0
Click to show internal directories.
Click to hide internal directories.