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.
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-coreNow build the add-on in watch mode
cd ember-toucan-core
pnpm startThen in another terminal, start the docs app:
cd docs-app
pnpm startNow 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: |
nicolechung
left a comment
There was a problem hiding this comment.
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
distfolder 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 thedistoutput 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-apppnpm _syncPnpmFar from good, but at least works...