-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add better broccoli-side-watch package #2141
Conversation
|
||
## Usage | ||
|
||
Let's assume you have a v2 addon in the `grand-prix` folder of your top-level folder of your Ember app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a bit confusing to me does it intend to say the below?
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 in the `grand-prix` folder of your monorepo that also contains your Ember app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, probably. I didn't change this, this was coming from the main
branch: https://github.com/embroider-build/embroider/blob/main/packages/broccoli-side-watch/README.md. But we can tweak this for sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@void-mAlex updated the Readme, if you want to give it another look!?
|
||
const app = new EmberApp(defaults, { | ||
trees: { | ||
app: sideWatch('app', { watching: ['./grand-prix/src'] }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't this imply nesting two package.json?
one for the Ember app and inside of it the v2 addon?
that seems wrong to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here! But yeah, I see what you are meaning. Will go over the Readme once more!
This looks ready to go. The beta test failure should be fixed on |
0096f79
to
ff8ad4c
Compare
We have the
broccoli-side-watch
on themain
branch only, as such there are only0.0.2-unstable.xxx
versions released. That version is only able to watch for explicitly passed folders, which is inconvenient when you want to watch for other packages (addons) in a monorepo, as you need to hard-code (or resolve programatically) the actual folders on disk (/path/to/addon/dist
), but what you rather want is an easy way to just list the package names, similar to what ember-auto-import'swatchDependencies
option does.So this PR is
stable
branchshared-internals
, which allows us to get the optimal watched directory given a package name, taking package.json#exports into account (e.g. watching only./dist
for common v2 addons, instead of the whole package folder including./src
). The plan would be to remove these utils from eai and import frrmshared-internals
once released.