-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Basic watcher setup #465
Basic watcher setup #465
Conversation
|
||
run(); | ||
|
||
var watcher = chokidar.watch(cli.input, {persistent: cli.flags.watch}); |
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 was thinking whether it would be more effective watch the whole cwd
instead of just test files, but wasn't sure what kind of performance impact would that have.
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 would think all of cwd excluding node_modules.
|
||
var cwd = process.cwd(); | ||
var watcher = chokidar.watch(cwd, { | ||
persistent: cli.flags.watch, |
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 no chokidar
code should be run unless cli.flags.watch
is true
. Currently if it's false
it means Chokidar probably won't emit changes, but I don't find the documentation entirely clear on this.
Nice! Some further feature thoughts:
|
@@ -48,6 +49,7 @@ var cli = meow([ | |||
' --tap, -t Generate TAP output', | |||
' --verbose, -v Enable verbose output', | |||
' --no-cache Disable the transpiler cache', | |||
' --watch, -w Run tests when files change', |
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.
This should be commented out. We decided to not yet expose this. #70 (comment)
Thinking through this some more, if a test file i deleted that test should no longer run, conversely when a new file is added it should be run. |
Closing in favor of #502. Sorry @tomazzaman, but that one is a lot more comprehensive. |
My first go at continuous watching using chokidar. Feedback welcome.
Fixes #70.