babel-plugin-wildcard icon indicating copy to clipboard operation
babel-plugin-wildcard copied to clipboard

Recursive imports

Open RayBenefield opened this issue 6 years ago • 13 comments

@vihanb So I've got the initial work on recursive imports working. I'm having a hard time figuring out the best way to handle filters, but normal wildcard works just fine. I tried to avoid re-factoring too much to avoid making things unfamiliar. This is actually my first non-company open source pull request so please forgive anything I might have missed.

If you need anything changed or clarified, then please let me know.

A couple asides:

  • I fixed a couple of tests
  • I added nodemon to setup a watching test-runner so I could easily build out this system
  • I use yarn so I've added my yarn.lock file so I can remove it if need be
  • I've never actually worked with a Babel plugin before, so I may be doing several things inefficiently
  • This does not solve index.js yet, it will be imported with index as its key instead of being loaded as the default and extended past that point

RayBenefield avatar Nov 18 '17 15:11 RayBenefield

Thanks for the PR! However from merging #10, which adds globs, some conflicts have occurred. Could you resolve these?

vihanb avatar Nov 18 '17 17:11 vihanb

I definitely can... I'm at a Code Retreat for most of the day, so I'll tackle it tonight.

RayBenefield avatar Nov 18 '17 17:11 RayBenefield

@vihanb did the rebase and @drgould's test as well as my tests seem to be working fine now.

Something to note, the deep recursive imports will also not work with file globbing right now. But root import file globbing still works. When I find some more time in the future I want to go through and refactor a bit to make sure everything is working in tandem. I'll write up some issues for each of them.

RayBenefield avatar Nov 19 '17 19:11 RayBenefield

@vihanb just dropping a quick reminder for a PR review in case you missed it. :)

RayBenefield avatar Nov 28 '17 02:11 RayBenefield

oh my >_< I had totally forgotten about this PR. I'll update NPM and merge tomorrow

vihanb avatar Dec 04 '17 05:12 vihanb

@vihanb fixed the readme @vihanb

RayBenefield avatar Dec 11 '17 18:12 RayBenefield

Is this going to be released? Would love to use this feature in my project. Thank you for writing this plugin!

burningTyger avatar Mar 14 '18 23:03 burningTyger

I want to add another comment to reiterate just how useful this PR would be. @vihanb are you still maintaining this project??

cur33 avatar Aug 25 '18 04:08 cur33

Yes I will be looking into merging this... hopefully I’ll have time this weekend but they are a few quirks I’ll have to check. I might rewrite parts of this to decouple the logic.

vihanb avatar Aug 25 '18 18:08 vihanb

That’s awesome, thanks! I tried to just use the forked repo via npm but it wasn’t working at compile time, so it would be awesome if it makes its way into the official package.

cur33 avatar Aug 25 '18 18:08 cur33

Any chance to get this into the project? :)

rwieruch avatar Sep 14 '18 04:09 rwieruch

A must have 👍

robsontenorio avatar Oct 20 '18 01:10 robsontenorio

is this repo still maintained?

pmunin avatar Jul 31 '20 20:07 pmunin