-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix sync-pnpm when already synced previously #61
Conversation
|
Preview URLsEnv: preview |
Suggestion (maybe I should file an issue for this): Can we change the port of either the docs-app or the test-app so I can run both at the same time? |
Wait...what is the difference between running |
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.
Nice! I also found success with using pnpm link
, but not sure if it's any better DX wise. Here's what I found with ember-toucan-core:
# add-on
cd ember-toucan-core
pnpm link .
# go to docs-app now and link it
cd ../docs-app
pnpm link @crowdstrike/ember-toucan-core
Now build the add-on in watch mode
cd ember-toucan-core
pnpm start
Then in another terminal, start the docs app:
cd docs-app
pnpm start
Now if you make a change in ember-toucan-core
, it auto-rebuilds and the updates are shown in the docs-app
!
FWIW, I just tried this in a super small example, not with actually building anything real, so there may still be issues with link
Yeah, it's only available to apps. Ideally we shouldn't call this ourselves of course (hence the underscored name), but we are still figuring things out. Seems @NullVoxPopuli is also up for something: |
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.
Okay now that I figured out how to get this running...this is definitely an improvement!
I only have to run the command pnpm _synchPnpm
once and it works!
The sync script would skip syncing the
dist
folder when it already exists. This is not good when running things locally, like when you run the test-app, and build the addon in watch mode, you would still need to run the sync script after changes in the addon manually. But without this fix here, it would not update thedist
output with the addon changes.Currently my development workflow with this is:
pnpm start
(runs test-app)cd <addon-dir>
pnpm start
(rollup in watch mode)cd test-app
pnpm _syncPnpm
Far from good, but at least works...