-
Notifications
You must be signed in to change notification settings - Fork 80
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
how to support vue file? #121
Comments
Hi! Thanks for the question. I don't know anything about how vue works or how it differs from any of the supported filetypes. Do you have links to more information on what you'd need that's vue specific? A sample vue repo with the output of a current run of dependency tree would help highlight the files that aren't parsed properly. Once I better understand what's not working on vue codebases, we can scope what would need to change to support it properly. Thanks! |
Thanks for your reply! About vue: vue is a Simple Project : demo is a simple ps: get-dependency-tree is work on Thanks Again |
Thanks for the extra detail! I appreciate it. I think the hard part here is handling .vue components that have embedded html and css. To get that to work, you need a custom parser to be used on .vue files. If you know of a well-supported library that can take in a vue file and return a JS AST, then it could be used to extract the imports from a .vue file. You could then possible use the commonjs module resolver to convert those extracted imports into concrete filepaths for recursive traversal. https://github.com/dependents/node-dependency-tree#how-does-this-work is an attempt at explaining the flow and the main modules at play for finding dependencies and mapping those dependencies to files for traversal. I'd look at the way the typescript support works and see how vue support can map to that. I don't use TS at all these days and haven't used Vue at all ever, so I can't really provide support myself (it would be naive and buggy, i'm sure). If you have the time and really want it in, I'm happy to answer questions or clarify the design of dependency-tree and its lower level modules. I welcome PRs and appreciate the help. |
I have fixed this problem. thank you for your explanation about vue-template-es2015-compiler is a loader to get how to parse vue file showed how to parse Finally, I have fixed this problem. if you have time you can support Thanks Again |
@Havunen isn't this fixed now with your changes? |
Yes, .vue files are now supported |
I find
.jsx
file is supported infilling-cabinet
by usejsLookup
. but no vueI want to get vue-project's dependency-tree want should i do?
The text was updated successfully, but these errors were encountered: