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

Watch support #70

Closed
rwu823 opened this issue Oct 3, 2015 · 16 comments
Closed

Watch support #70

rwu823 opened this issue Oct 3, 2015 · 16 comments
Labels

Comments

@rwu823
Copy link

rwu823 commented Oct 3, 2015

$ ava --watch

Is this a plan?

@scottcorgan
Copy link

You could probably just use the onchange module.

{
  "scripts": {
    "test": "onchange 'test/*.js' -- ava test/*.js"
  }
}

@Whoaa512
Copy link

or nodemon

{
  "scripts": {
    "test": "nodemon test/*.js --exec ava"
  }
}

@floatdrop
Copy link
Contributor

In fact I would be cool, if ava could run only changed test in a file, not a whole file with tests.

@sindresorhus sindresorhus changed the title watch support Watch support Oct 24, 2015
@schnittstabil
Copy link

I think the common use case is watching the source directory and the test directory (not only the current existing files). And I suppose that the sources change far more often than the test.

@sindresorhus sindresorhus added the enhancement new functionality label Oct 30, 2015
@sindresorhus sindresorhus added this to the Future milestone Dec 27, 2015
@asbjornenge
Copy link

There is also the watch unix command.

But none of these can be compared to ava supporting filewatching internally. I love the fast feedback loop mocha -w gives me, and would ❤️ to see ava have this feature.

@sindresorhus
Copy link
Member

This is now PR welcome. Should use https://github.com/paulmillr/chokidar.

@tomazzaman has indicated in #458 that he's interested in working on this.

@vadimdemedes
Copy link
Contributor

@sindresorhus Are you sure AVA is ready for this feature? We have lots of perf/babel issues on the table to solve. Watch feature is not that important like providing great experience (especially first experience) to the users.

@sindresorhus
Copy link
Member

@vdemedes I'm afraid of that too, but I'm thinking we add it undocumented, dogfood it, and only document it when we feel it's stable enough and we're ready to take on the addition support burden. And many people have told me watch is a big reason for them to stay with Mocha, which makes me think watch is part of providing a great experience.

@vadimdemedes
Copy link
Contributor

@sindresorhus Ok, sounds like a plan ;)

@tomazzaman
Copy link

I too come from Mocha-world and this was by far bigger selling point than speed. I want continuous feedback loop more than speed.

@sindresorhus
Copy link
Member

@tomazzaman Thanks. The more usage feedback we get on issues, the easier it is for us to make informed choices :) Feel free to comment opinions on any other issue. You might also like #115.

@tomazzaman
Copy link

Ha! Indeed I like it, but not sure whether my JS skills are there yet. I've written a few watchers for my own projects (so I know a thing or two about it), but nothing as complex as #115. Maybe I'm just needlessly intimidated though :)

@sindresorhus
Copy link
Member

@tomazzaman I didn't mean you should do it. Just that you might find the idea interesting ;)

@novemberborn
Copy link
Member

I'd be happy to take this on. I've used watchers extensively when building dev stacks.

@tomazzaman
Copy link

@novemberborn @sindresorhus I've created a PR #465 , just a basic watcher for now, but works. I'd be more than happy to hear your feedback to learn whether I'm on the right track

@sindresorhus
Copy link
Member

This needs to be taken into account: babel/babel#3307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants