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

Exclude some paths from .git folder removal #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JohnAlbin
Copy link

@JohnAlbin JohnAlbin commented Jul 20, 2021

Sometimes, you want to develop one or more of the composer dependencies while they are installed inside your project. Normally, this plugin deletes all dependencies' .git folders. This PR adds an "exclude" feature that allows you to exclude some .git folders from this plugin's deletion.

The "exclude" paths entry is an array of regex patterns that are consumed by Symfony's Finder (docs)

The docs on how to use this feature are in the README.

README.md Outdated
* `["some/directory", "another/directory"]`
* `"/some\\/special\\/dir/"`

(Note that any backslash characters in a regex string need to be escaped with an extra backslash when used in a JSON file like composer.json. In other words, PHP's `'/custom\/*/'` becomes `"/custom\\*/"` in JSON.)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(Note that any backslash characters in a regex string need to be escaped with an extra backslash when used in a JSON file like composer.json. In other words, PHP's `'/custom\/*/'` becomes `"/custom\\*/"` in JSON.)
(Note that any backslash characters in a regex string need to be escaped with an extra backslash when used in a JSON file like composer.json. In other words, PHP's `'/custom\/*/'` becomes `"/custom\\/*/"` in JSON.)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good eyes! Fixed.

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.

2 participants