Skip to content
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

Postinstall sync #5760

Merged
merged 12 commits into from
Jul 31, 2022
Merged

Postinstall sync #5760

merged 12 commits into from
Jul 31, 2022

Conversation

Rich-Harris
Copy link
Member

satisfying my curiosity about #5651 (comment)

@changeset-bot
Copy link

changeset-bot bot commented Jul 29, 2022

🦋 Changeset detected

Latest commit: 072fe86

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
create-svelte Patch
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Rich-Harris
Copy link
Member Author

ahhh. i see

@Rich-Harris
Copy link
Member Author

Ok, I think this is slightly simpler than #5651 — I prefer the idea of adding as little code as possible to deal with the case of our own CI stuff — but I'll wait for a 👍 before merging

@@ -6,8 +6,7 @@
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "node ../../cli.js sync",
"check": "tsc && svelte-check",
"check": "svelte-kit sync && tsc && svelte-check",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"check": "svelte-kit sync && tsc && svelte-check",
"check": "node ../../cli.js sync && tsc && svelte-check",

without this is always goes to dist for me.
And do we want to keep the prepare script too to work around the fact that pnpm doesn't call postinstall for workspace dependencies in a monorepo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah, changed it to ../../cli.js so we can test out changes to the sync script without rebuilding.

IIRC the prepare script was running before stuff was built, which meant it didn't work (though that would have been fixed by the ../../cli.js I guess) but in any case "prepare": "svelte-kit sync" is now a no-op, so there's no reason to keep it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking of prepare with the ../../cli.js call too, so that when you pull changes and do pnpm i it syncs to avoid red squiggles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants