-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
feat: support additional watchlist #208
Conversation
src/watch/index.ts
Outdated
@@ -35,6 +35,10 @@ const flags = { | |||
type: [String], | |||
description: 'Paths & globs to exclude from being watched', | |||
}, | |||
add: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to include
.
Can you also add an exclude
flag that's identical to ignore
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified, see if it meets expectations, and I also added the noIgnore flag, otherwise some requirements may not be met, such as hidden file .env
Thanks for the PR. Can you add a test? |
src/watch/index.ts
Outdated
@@ -35,6 +40,14 @@ const flags = { | |||
type: [String], | |||
description: 'Paths & globs to exclude from being watched', | |||
}, | |||
include: { | |||
type: [String], | |||
description: 'Additional paths in the watchlist', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow same format as exclude
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/watch/index.ts
Outdated
ignored: [ | ||
// Hidden directories like .git | ||
'**/.*/**', | ||
ignored: !argv.flags.noIgnore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a pretty big foot-gun that leads devs into watching a ton of files.
Supporting watching .env
is a good example, but we'll need to think of a better way to make these exceptions. Ideally via --include
.
I don't want it to block this PR so can you file a new issue for discussion or open a PR with a proposal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I have removed ignored
tag and used include
to filter the list of ignore
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, I don't have the capacity to test and review that functionality.
I don't want it to block this PR so can you file a new issue for discussion or open a PR with a proposal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I'll revert unnecessary changes asap, add a test and file a new issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated this pr and opened a new issue #210.
Co-authored-by: hiroki osame <hiroki.osame@gmail.com>
This comment was marked as off-topic.
This comment was marked as off-topic.
@privatenumber, Is this likely to be merged? It looks like your comments were addressed. |
Hey @privatenumber! |
Sorry but unless this request is coming from a sponsor, this project is just something I work on for fun when I have a few min to spare, and I haven't had time to review this again. Hope to revisit in a few weeks when I wrap up my current project. |
Why was this closed? Was there a concern with the content or some other reason? (It does say "PR welcome" in #181) I was about to open a new one for this feature (master...zommerfelds:tsx:master), but then I noticed this existed already. |
When I changed the default branch on the repo, it unexpectedly closed all PRs. Feel free to re-open. |
@boxizen are you interested in changing this PR to point to the master branch and re-opening? I think this looks pretty much ready to be merged. I tried to create a separate PR but didn't have access. |
closes #181
This change adds additional files to the watchlist via adding the
add
parameter.