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 feature ignorefile #94

Merged
merged 21 commits into from
Sep 10, 2019
Merged

Add feature ignorefile #94

merged 21 commits into from
Sep 10, 2019

Conversation

Oak-V
Copy link
Contributor

@Oak-V Oak-V commented Sep 8, 2019

This implements the feature described in #93.

Usage:

# custom path
$ onchange '*/*.js' -e './demo.js' --ignore-path ./.gitignore -- prettier --write {{changed}}

# or get ./.onchangeignore
$ onchange '*/*.js' -e './demo.js' -- prettier --write {{changed}}

any questions or refactoring needs just talk.

=]

index.js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
@Oak-V
Copy link
Contributor Author

Oak-V commented Sep 8, 2019

I see you have a lot of 'var' instead of 'const / let' would it be nice to change?

@blakeembrey
Copy link
Collaborator

blakeembrey commented Sep 8, 2019

@vinyfc93 No, that should be a separate feature. Stick with var for now.

Edit: I see you already did it, I suppose you can leave it anyway now 🤷‍♂ In the future it'd be a lot easier to review if you minimize the number of things you change in a single PR, otherwise it can get frustrating for the both of us as I give feedback for things out of scope.

@Oak-V
Copy link
Contributor Author

Oak-V commented Sep 9, 2019

Sorry for the confusion with var and const/let. I have been working alone for a long time. Anyway, I made the changes so that we use ignore instead of a custom solution.
You had reason to pass the function to chokidar, had not realized that possibility.
I hope we solved everything.
=]

@Oak-V Oak-V requested a review from blakeembrey September 9, 2019 17:19
@blakeembrey
Copy link
Collaborator

I'll merge it as is but refactor a little before pushing it out - I'm not 100% sure if ignore behaves the same as the existing exclude so I'll play it safe and then re-introduce using ignore 100% for the next version.

@blakeembrey blakeembrey merged commit 9388c2e into Qard:master Sep 10, 2019
@Oak-V
Copy link
Contributor Author

Oak-V commented Sep 10, 2019

What are the next steps? How can I help you?

@Oak-V Oak-V deleted the feature_ignorefile branch September 10, 2019 01:40
@Oak-V Oak-V restored the feature_ignorefile branch September 10, 2019 01:41
@Oak-V Oak-V deleted the feature_ignorefile branch September 10, 2019 01:41
@blakeembrey
Copy link
Collaborator

@vinyfc93 I pushed a small tidy up in 547651c. I will document re-enabling the default value and renaming to ignore-path in the next major release. For now I'm sticking with --exclude to match the existing flag. I'll try to get a major release out soon with a couple of other fixes I'd like to see, including merging cross-spawn.

@Oak-V
Copy link
Contributor Author

Oak-V commented Sep 10, 2019

Nice! If you want my help with something else just talks.

Good job and see you soon.

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.

3 participants