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

[WIP] Add svelte-kit adapt package script to create-svelte projects and every example #392

Closed
wants to merge 3 commits into from

Conversation

babichjacob
Copy link
Member

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: No adapter by default #62 (comment)
  • This message body should clearly illustrate what problems it solves. Support questions come up in the Discord server multiple times per day about "broken" app builds, but are solved by just running adapt. This isn't intended to address the separation of build and adapt, but to just make adapt readily available since it is currently necessary to "complete" a build. Feel free to revise or reject this PR if e.x. the commands should be merged instead, making this useless.
  • Ideally, include a test that fails without this PR but passes with it. Nothing to test (imo).

Tests

  • Run the tests with npm test and lint the project with npm run lint.

@babichjacob
Copy link
Member Author

babichjacob commented Feb 16, 2021

If this is accepted, I'm not in any hurry to get another release of create-svelte out that includes it, so I shouldn't be doing anything to do with version bumping or changeset or anything along those lines right? Just let it sit until a more desperate update happens that causes this to get published with it as a "bonus"?

On the other hand, if it's needed / wanted for me to do that, I couldn't find the discussion / vent about what things have to be done to get a new version of something ready for publish after about 15 minutes of searching.

@benmccann
Copy link
Member

@Conduitry and I had some questions about what the best way to handle this was in #382 and #62 (comment). I personally would lean towards not having two separate commands or having npm run build also run svelte-kit adapt, but might be missing some of the context. @Rich-Harris would you be able to weigh in here?

… `build`) in `create-svelte` projects and every example and test directory
…them fail and adapters weren't the point of those tests anyway
@babichjacob babichjacob changed the title Add adapt package script to create-svelte projects and every example and test directory Add adapt package script to create-svelte projects and every example Feb 16, 2021
@babichjacob babichjacob changed the title Add adapt package script to create-svelte projects and every example [WIP] Add adapt package script to create-svelte projects and every example Feb 16, 2021
@babichjacob babichjacob changed the title [WIP] Add adapt package script to create-svelte projects and every example [WIP] Add svelte-kit adapt package script to create-svelte projects and every example Feb 16, 2021
@babichjacob
Copy link
Member Author

The latest commits switch "adapt" to "postbuild".

I suspect the examples are failing because they run in parallel, so prerendering one is trying to take resources from another. Thinking of ways to fix it / figuring out where to, so I marked this PR as a WIP.

@Rich-Harris
Copy link
Member

@Rich-Harris would you be able to weigh in here?

yeah, I've come to the view that svelte-kit build should run adapt if an adapter is specified — it's the least surprising thing. It is useful to have a conceptual separation between building and adapting (since e.g. svelte-kit start runs the production build locally but ignores whatever the adapter did) but the CLI doesn't need to be overly fussy about that separation.

@benmccann
Copy link
Member

Addressed by #430

@benmccann benmccann closed this Mar 2, 2021
@benmccann benmccann deleted the add-adapt-package-script branch March 2, 2021 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples feature / enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants