Jujulego / jill

Zero-config monorepo cli
MIT License
3 stars 1 forks source link

Add a "watch" command #880

Open Jujulego opened 10 months ago

Jujulego commented 10 months ago

The idea is to behave like the "run" command, but instead of ending when all task are done, this should watch over input files, and retrigger tasks affected by detected changes, and then retrigger dependent tasks.

Problems:

Jujulego commented 10 months ago

To detect : use .gitignore file => all that is not ignored might be a source file + override by a property in workspace's package.json

Jujulego commented 10 months ago

Rollup integration (and vite) : can develop a plugin, using buildStart & buildEnd to monitor rollup build state.

buildStart can return a Promise (might allow to control start if rollup waits for it to resolve)

Rollup plugin doc

Jujulego commented 10 months ago

Webpack integration : can develop a plugin, using beforeRun & done to monitor webpack state.

beforeRun is async & serial => might allow to control compilation start

Webpack compile hooks