add package script, change behaviour of build script#8368
add package script, change behaviour of build script#8368Rich-Harris wants to merge 5 commits intomasterfrom
Conversation
🦋 Changeset detectedLatest commit: 4f614bc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
| "dev": "vite dev", | ||
| "build": "svelte-kit sync && svelte-package", | ||
| "build": "vite build && npm run package", | ||
| "package": "svelte-kit sync && svelte-package", |
There was a problem hiding this comment.
IIRC svelte-package doesn't do checking and svelte-check isn't included in the library template so the generated types go unused. svelte-check and a check command should probably be added in as well esp with #8484 merged.
There was a problem hiding this comment.
Good point. I wonder if we should try and make svelte-check only apply to packaged files rather than the entire app — would be annoying if you couldn't publish because of a finicky type error in your docs site that you don't really care about
There was a problem hiding this comment.
For that we could create a tsconfig.lib.json which only includes the files inside lib and reference that from svelte-check
There was a problem hiding this comment.
feels a bit messy to create a new file, and if config.kit.files.lib changed the developer would also need to change tsconfig.lib.json... perhaps there's a way to integrate checking into the svelte-package command instead?
|
Closing in favor of #8922 (which will also make this change) |
closes #8240
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. All changesets should bepatchuntil SvelteKit 1.0