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

allow to use auto-install recursively #15

Merged
merged 11 commits into from
Oct 10, 2015
Merged

Conversation

sieira
Copy link
Contributor

@sieira sieira commented Sep 29, 2015

This changes apply to this feature request

I'm a complete newbie to grunt so I didn't manage to add the required tests...

@sieira
Copy link
Contributor Author

sieira commented Sep 30, 2015

There you are. Just some considerations :

  1. When using the option "match", each component of the path to a folder has to match the regexps. For instance: match: 'test' will include __basedir/test and __basedir/test/test1, but not __basedir/test/something
  2. Using the exclude option will ignore any directory matching the regexps, and all it's subdirectories.
  3. This will fail when there are not package.json or bower.json file in the directory

I don't know if this is a proper behaviour (it applies for what I'm needing right now)

A different approach could be to get all the directories matching the regexps even if their parents don't (it may be more convenient), and ignore the excluded and all it's children.

By the way, since using this procedure for the installation is most likely done in a situation where front and backend are splitted, the auto-install should try to avoid running npm or bower if the package.json or the bower.json file are not in the directory instead of failing...

Just let me know how you prefer to do this

@sieira
Copy link
Contributor Author

sieira commented Sep 30, 2015

Sorry for flooding this thread. I adapted the feature to the behaviour mentioned above:

So now:

  • recursive false by default activates/desactivates the recursive install process
  • match A regexp or an array of regexp which is a tautology by default, and tells the installer to perform the install only on the directories whose name matches some pattern on the matching list regardless of the matching status of his parent
  • exclude A regexp or an array of regexp which is a contradiction by default, and tells the installer to ignore all the directories and it's subdirectories matching some pattern on the exclusion list.

@Manabu-GT
Copy link
Owner

👍

Manabu-GT added a commit that referenced this pull request Oct 10, 2015
feature: allow to use auto-install recursively
@Manabu-GT Manabu-GT merged commit 1e126ad into Manabu-GT:master Oct 10, 2015
@Manabu-GT
Copy link
Owner

After I fix some typos, two jshint errors, and update test code a bit, this will be released as v0.3.0.

Thank you.

@sieira
Copy link
Contributor Author

sieira commented Oct 10, 2015

Glad to have helped, thank you for the module too. 👍

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.

None yet

2 participants