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

Add filter #17

Closed
wants to merge 4 commits into from
Closed

Add filter #17

wants to merge 4 commits into from

Conversation

tpgmartin
Copy link

This is in relation to this issue #14

@lbeschastny
Copy link

@tpgmartin great job! 👍
Your patch worked like a charm for me.
Hope @aseemk will merge it soon.

@aseemk
Copy link
Owner

aseemk commented Aug 9, 2015

Thanks guys, and my apologies for the delay!

I'm just curious to understand the use case a bit more. Would you guys mind sharing what you ignore?

@lbeschastny
Copy link

@aseemk I have two very similar use-cases from two different projects.

1. Base class

Suppose, I have a models directory containing a bunch of similar classes (e.g. models for my DB ORM or for client-side MVC framework). One of those files contains a base class, used to build all other classes.

Now I want to add an index file to require all my classes (except for the base class). I don't want to require the base class for two reasons:

  • I don't need it outside of my models directory;
  • I want to be able to iterate over my models to perform some general things (e.g. bootstrapping DB ORM models to database collections) without explicitly filtering base class.

2. Having both generalized and ready-to-use root modules

Suppose, I have a models directory containing all my ORM models. But before I'll be able to use those modules, I should bootstrap them to some database.

Now I want to add two root modules to use them in different situations:

  • Generalized factory module, accepting DB config and returning bootstrapped models.
  • An index file, exporting already bootstrapped models (using project config).

Later I'll use generalized factory module in my tests (to run them with different DB configurations), while the rest of my project will use already bootstrapped models provided by an index file.

But to do so I'll have to ignore my index file when reading my models directory from within the factory module.

@trestletech
Copy link

Thanks. Now depending on this fork for my project. Would love to see it merged in.

@aseemk
Copy link
Owner

aseemk commented Jan 20, 2016

Sorry folks, I've been unusually busy with both work and life for a sustained period of time now. I keep meaning to get to these PRs (and other projects), but don't find myself with the time + energy too often.

One thing I've done with another project is to invite one or two other people to be collaborators in the project and help maintain it. Anyone here interested in that?

I'd just ask that you be mindful of keeping this project focused, and not let it get too complex. E.g. I'm not 100% sure it's a good idea to accept all of the currently open PRs, but I haven't looked into them fully or thought deeply about it.

Apologies again for the delay, and thank you for understanding. =)

@trestletech
Copy link

No need to apologize; you're volunteering your time. I appreciate the offer to add a collaborator, but also don't have time to take on maintenance at the moment. Hopefully somebody will be able to pick this up.

Thanks again!

@lbeschastny
Copy link

lbeschastny commented May 3, 2016

So, any progress here?

By the way, another ignore implementation was submitted as a PR #31

@aseemk
Copy link
Owner

aseemk commented Oct 24, 2016

Hi there,

I'm sorry I haven't been timely in responding to these issues and PRs.

If you're interested in taking over the maintainer role for this project, please let me know.

More details: #31 (comment)

Cheers,
Aseem

@yocontra
Copy link
Collaborator

yocontra commented Feb 7, 2018

Hi (new maintainer) - I've merged #27 which does the same thing, and was the first PR submitted to solve this problem. You should be able to achieve the same functionality with that. I'll be publishing it to npm shortly.

@yocontra yocontra closed this Feb 7, 2018
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

Successfully merging this pull request may close these issues.

5 participants