gajus / create-index

Creates ES6 ./index.js file in target directories that imports and exports all sibling files and directories.
Other
278 stars 87 forks source link

Adding flags to use implicit defaults and wildcard folders #55

Open toddtarsi opened 4 years ago

toddtarsi commented 4 years ago

I found an issue in the recurse logic. This tool creates a bunch of named exports. It can recurse. It grabs default exports normally. This means it has issues recursing itself because it's not grabbing the child folder's named exports. It's resolved by using wildcard characters on folders. I don't want to mess with existing stuff, so it's an optional flag.

Also, I added a flag so defaults could be made implicit instead of explicit. More OCD than anything.

Thanks for the great tool and if you don't want to incorporate this stuff, let me know. Thanks!

Also, I can change the file permissions and gitignore back np.

gajus commented 4 years ago

Also, I can change the file permissions and gitignore back np.

Yes, please.

gajus commented 4 years ago

The current PR is a mess. It would probably be easier to force push just the changes.

toddtarsi commented 4 years ago

@gajus - Done and done. Also, I rebased all the 644 commits down to one. Sorry about that!

toddtarsi commented 4 years ago

@gajus - Thanks for reviewing this. I added everything but the hyphen delimiters and the tests. I'll look at the tests a little later. If you still want the hyphen delimiters, I can do that as well, but I saw an existing convention further back in the repo.