broccolijs / broccoli

Browser compilation library – an asset pipeline for applications that run in the browser
https://broccoli.build
MIT License
3.33k stars 217 forks source link

add the ability to ignore absolute paths from watcher #474

Closed ef4 closed 3 years ago

ef4 commented 3 years ago

(This PR builds off https://github.com/broccolijs/broccoli/pull/473, for a smaller review see only https://github.com/broccolijs/broccoli/commit/5fda57e0645855fcd0186af9919af7e0caea8f26.)

This adds an option to mark certain absolute paths as ignored by the watcher.

The motivation here is that if you want to be able to rebuild arbitrary node packages (which can put their source code at the top level of their project if they want to), and those packages emit build artifacts into some of their own subdirectories (like dist as used by ember-cli), you end up watching your own output.

In this situation, it is straightforward to know which path(s) are your own output, and tell broccoli not to watch them.

sane's ignored option is perfect for this, except that it's always relative to the watchedDir, so broccoli's Watcher must translate.

rwjblue commented 3 years ago

FYI - Just landed https://github.com/broccolijs/broccoli/pull/473, doesn't seem like this needs a rebase though.

rwjblue commented 3 years ago

Released in https://github.com/broccolijs/broccoli/releases/tag/v3.5.0