Skip to content
This repository has been archived by the owner on Aug 11, 2019. It is now read-only.

Watch Mode? #21

Open
ChrisTalman opened this issue Jun 17, 2017 · 2 comments
Open

Watch Mode? #21

ChrisTalman opened this issue Jun 17, 2017 · 2 comments

Comments

@ChrisTalman
Copy link

Should the CLI include a -watch option? It could be useful during development. It could be similar to watch in TypeScript.

@Rich-Harris
Copy link
Member

It could do, yeah. watch modes can get surprisingly complicated — the built-in fs.watch is unreliable on some platforms so you sometimes have to use something like chokidar, which can also be a bit of a pain, and you have to handle all kinds of weird cases like files being renamed, files being created in a watched directory, etc.

So we haven't bothered with that yet because for the most part it's best left to things like webpack and Rollup (with rollup-watch) — they've already solved these problems, and have extra features (like CSS extraction) that are maybe a little harder to do via a CLI.

But it would be a good addition in the longer term. PRs always welcome! 😀

@ScottMaclure
Copy link

Yeh I'm using rollup-watch (with rollup-plugin-svelte of course). Single responsibility principle?

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

No branches or pull requests

3 participants