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

Typescript dependencies support #49

Closed
jbcam opened this issue Mar 26, 2019 · 5 comments
Closed

Typescript dependencies support #49

jbcam opened this issue Mar 26, 2019 · 5 comments

Comments

@jbcam
Copy link
Contributor

jbcam commented Mar 26, 2019

I don't seem to be able to display components hierarchy links (as per JS files) for a project with .tsx react component files.

@Bogdan-Lyashenko
Copy link
Owner

Hi there) Can you please attach screenshot what you mean by “components hierarchy links”? Thanks.

@jbcam
Copy link
Contributor Author

jbcam commented Mar 26, 2019

sure :)

Basically I would be interested to see the same blue links for TS files between parent and child components as on that sample JS project bellow:

Screenshot 2019-03-26 at 6 43 38 PM

thanks!

@Bogdan-Lyashenko
Copy link
Owner

I see. That's "Dependencies tree". So, here is the deal, currently this feature supported only for JavaScript, it's mentioned in README somewhere :). To build dependencies tree I need some way to resolve dependencies based on imports/exports or whatever way that particular language handles it. For JavaScript I use https://github.com/pahen/madge, and for other languages there are placeholders which resolve empty arrays (and waiting for being implemented).
E.g.
https://github.com/Bogdan-Lyashenko/codecrumbs/blob/master/src/server/code-parse/language/typescript/dependencies.js
https://github.com/Bogdan-Lyashenko/codecrumbs/blob/master/src/server/code-parse/language/default/dependencies.js

I just checked https://github.com/pahen/madge now and it seems to support TS as well. It should be fairly easy to implement its usage as well. Are you interested to contribute? 😉

@jbcam
Copy link
Contributor Author

jbcam commented Mar 27, 2019 via email

@Bogdan-Lyashenko
Copy link
Owner

Awesome. Check the links to files above. Also see how JS does it https://github.com/Bogdan-Lyashenko/codecrumbs/blob/master/src/server/code-parse/language/javascript/dependencies.js
Ping me if need anything. Thanks)

@jbcam jbcam changed the title React-TypeScript component hierarchy not detected Typescript dependencies support Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants