npm.io
0.2.4 • Published 1 week ago

@codegraphy-dev/plugin-svelte

Licence
MIT
Version
0.2.4
Deps
3
Size
41 kB
Vulns
0
Weekly
0
Stars
3

CodeGraphy Svelte

Adds Svelte component script import analysis to CodeGraphy.

Install

Install @codegraphy-dev/core first if the codegraphy CLI is not already available.

npm i -g @codegraphy-dev/plugin-svelte
codegraphy plugins register @codegraphy-dev/plugin-svelte
codegraphy plugins enable @codegraphy-dev/plugin-svelte
codegraphy index

What It Provides

This plugin parses Svelte components with svelte/compiler and indexes relative imports from module and instance scripts.

  • runtime imports become baseline import relationships
  • type-only imports become type-import relationships
  • dynamic import() calls become lazy import relationships
  • explicit .svelte component imports resolve to Svelte component files
  • TypeScript and JavaScript script imports resolve with the baseline extension candidates

This first version intentionally skips SvelteKit route semantics.

More