Skip to content

Commit

Permalink
Tweak Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
simonihmig committed Oct 8, 2024
1 parent c484b9e commit ff8ad4c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/broccoli-side-watch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ A micro library that allows watching folders for changes outside the `app` folde

## Usage

Let's assume you have a v2 addon in the `grand-prix` folder of your top-level folder of your Ember app.
Let's assume you have a v2 addon with a package name of `grand-prix` somewhere in your monorepo that also contains your Ember app.

Every time you change something in the source of that add-on, you can rebuild it by watching the addon's build (currently using Rollup). However, by default the host Ember app doesn't rebuild automatically, so you have to restart the Ember app every time this happens which is a slog.
Every time you change something in the source of that addon, you can rebuild it by watching the addon's build (currently using rollup). However, by default the host Ember app doesn't rebuild automatically, so you have to restart the Ember app every time this happens which is a slog.

With this library, you can add the following to your `ember-cli-build.js` to vastly improve your life as a developer:

Expand All @@ -15,7 +15,10 @@ const sideWatch = require('@embroider/broccoli-side-watch');

const app = new EmberApp(defaults, {
trees: {
app: sideWatch('app', { watching: ['./grand-prix/src'] }),
app: sideWatch('app', { watching: [
'grand-prix', // this will resolve the package by name and watch all its importable code
'../grand-prix/dist', // or you point to a specific directory to be watched
] }),
},
});
```

0 comments on commit ff8ad4c

Please sign in to comment.