hb1998 / react-component-tree

React Component Viewer - A convenient way to traverse your React app in VS Code
https://marketplace.visualstudio.com/items?itemName=HabeebArul.react-component-tree
MIT License
23 stars 6 forks source link

Update parsing logic to use Babel type guards #7

Closed MajorLift closed 1 year ago

MajorLift commented 1 year ago

Hi, it's great to see this project revived.

I was wondering if the current team might be open to new contributions.

I briefly worked on updating the sapling parser to use babel type guards instead of tokens for parsing import statements. The code becomes a lot more declarative this way, which should make it easier to maintain and extend features.

https://github.com/MajorLift/sapling/blob/a52c92be4a2312925deca829753211134546c9bb/sapling/src/SaplingParser.ts#L265-L456

If this doesn't conflict with the general direction the current team is taking, I'd love to take another stab at it. I'm interested in contributing to other areas as well.

Let me know your thoughts. :)

hb1998 commented 1 year ago

@MajorLift Hi Major, we are totally open to new contributions, Let us check it out and revert back. :)

MajorLift commented 1 year ago

Awesome! I'll see if I can make it work with the updates you guys have made, and post a PR when I'm done.

hb1998 commented 1 year ago

@MajorLift sounds good