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

add package script, change behaviour of build script #8368

Closed
wants to merge 5 commits into from

Conversation

Rich-Harris
Copy link
Member

closes #8240

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

@changeset-bot
Copy link

changeset-bot bot commented Jan 6, 2023

🦋 Changeset detected

Latest commit: 4f614bc

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

This PR includes changesets to release 1 package
Name Type
create-svelte Major

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",
Copy link
Contributor

@gtm-nayan gtm-nayan Jan 19, 2023

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.

Copy link
Member Author

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

Copy link
Member

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 includes the files inside lib and reference that from svelte-check

Copy link
Member Author

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?

@dummdidumm
Copy link
Member

Closing in favor of #8922 (which will also make this change)

@dummdidumm dummdidumm closed this Feb 7, 2023
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.

[create-svelte] packaging shouldn't override the build command for skeletonlib
5 participants