Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svelte support and usage via CLI #339

Open
guilherssousa opened this issue Jan 10, 2023 · 8 comments
Open

Svelte support and usage via CLI #339

guilherssousa opened this issue Jan 10, 2023 · 8 comments
Labels
core dependency tree generation

Comments

@guilherssousa
Copy link

Is it possible to track dependencies in Svelte SFCs? I tried to run the CLI passing the --extensions svelte --orphans to find unused files on my project after refactoring it, and the files aren't being showed at all, and when .svelte files appear, usually they are just Route Files that aren't imported to any other place, being used by SvelteKit compiler instead.w

@mrjoelkemp
Copy link
Contributor

Hey! It's likely possible but may require hooking the .svelte filepath into dependency-tree or it's node-precinct and/or node-filing-cabinet libraries.

You'd have to contribute the PRs yourself though.

@guilherssousa
Copy link
Author

I'm really new to madge. Is there any plugin system or solid method to extend the original functioning?

@PabloLION PabloLION added the core dependency tree generation label Jan 28, 2023
@PabloLION
Copy link
Collaborator

We should solve this along #122

@guilherssousa
Copy link
Author

I started working on a demo based on the work made by #122 author, the logic of the code is pretty much the same so it may make sense to work on both together in order to release a way to interact with SFC scripts

@PabloLION
Copy link
Collaborator

@guilherssousa Thanks. I'm busy reading & adding labels to all current issues. Looking forward to your PR!❤️

@mustafa0x
Copy link

Vue support was added in v8 last month. Any chance we get svelte support?

@benmccann
Copy link

The commit that added Vue support was in the filing-cabinet project here: dependents/node-filing-cabinet#111

Svelte support would need to be added to that library

@benmccann
Copy link

Looks like the change to do that might only be a couple of lines. Can probably just rename vueLookup to sfcLookup and reuse it for Svelte as there doesn't appear to be any Vue-specific code in it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core dependency tree generation
Projects
None yet
Development

No branches or pull requests

5 participants