rollup / rollup-watch

Fast incremental rebuilds with Rollup CLI
MIT License
91 stars 23 forks source link

New option to run another script when start watching #53

Open binarykitchen opened 7 years ago

binarykitchen commented 7 years ago

Such a hook would be great and useful for this scenario: call browser-sync ... once rollup has bundled and starts watching for changes.

Don't want browser-sync to open the browser before bundling is complete you know.

meszaros-lajos-gyorgy commented 7 years ago

+1 for this feature, because at the moment we cannot distinguish, if rollup was started with a watch option.

meszaros-lajos-gyorgy commented 7 years ago

Might be a duplicate for #48

binarykitchen commented 7 years ago

Not really a duplicate, more like a post-hook, to run something else when watching has started.

ScottMaclure commented 7 years ago

Use case: I want to re-run sw-precache every time rollup has finished building assets.

Edit: Add a "pre-hook" as well, so I can run a linter beforehand (fail early).

CoskunSunali commented 6 years ago

Would be really useful.