-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 package script, change behaviour of build script #8368
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 |
@@ -3,7 +3,8 @@ | |||
"version": "0.0.1", | |||
"scripts": { | |||
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For that we could create a tsconfig.lib.json
which only include
s the files inside lib
and reference that from svelte-check
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.
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 test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0