-
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
Improve source pattern handling #614
Comments
Perhaps |
@novemberborn I don't think we should invent our own glob patterns.
Why? I'm failing to see the problem here. Maybe provide an example? |
Hmm. The problem may be different actually. We should be able to merge the ignore patterns. However it should be possible to override a pattern. For example you might want to treat a dependency as a source so you can more easily debug that dependency and it's impact on your own project. I'll need to verify whether adding |
Fixes #614. Allow negated source patterns to be specified without unsetting the default negation patterns. Allow source patterns to override the default negation patterns if they start with one of the ignored directories.
#730 ensures that:
|
Fixes #614. Allow negated source patterns to be specified without unsetting the default negation patterns. Allow source patterns to override the default negation patterns if they start with one of the ignored directories.
* watcher: correctly test if source is in the cwd Make sure the path starts with ../ (after platform-specific slashes have been corrected). Clarify existing test and add a case where the source starts with two dots but is still in the current working directory. * change handling of negated source patterns Fixes #614. Allow negated source patterns to be specified without unsetting the default negation patterns. Allow source patterns to override the default negation patterns if they start with one of the ignored directories. * update watch mode docs * Suggest `watch:test` as the npm script * Document how to always enable watch mode using the ava section in package.json * Recommend source patterns are configured through the ava section in package.json * Suggest using the verbose reporter when debugging
Watch mode lets you configure which source files should be watched. Certain directories are ignored by default, using https://github.com/novemberborn/ignore-by-default. Currently if you use a negation pattern in
--source
it stops ignoring those default directories. This is annoying as you'll have to repeat them manually.It would be good to stop one of those default directories from being ignored. Then we could let you specify a negation pattern without disabling all default ignore patterns.
You can find the current logic at https://github.com/sindresorhus/ava/blob/1868204c1901f45b4f66a520ef6486fdd71fe1d2/lib/watcher.js#L273:L276.
The text was updated successfully, but these errors were encountered: