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

create-astro updates #12083

Draft
wants to merge 8 commits into
base: next
Choose a base branch
from
Draft

create-astro updates #12083

wants to merge 8 commits into from

Conversation

Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Sep 27, 2024

Changes

This PR includes a few changes to the experience of creating a new project in Astro:

  • The list of available templates is now the following:
    • Basics
    • Blog
    • Docs (Starlight)
    • Portfolio
    • In the stable version of Astro 5, Storefront will be added as well
  • The TypeScript question has been removed, the default value is now strict for everyone. The presets still exists for anyone wanting a more relaxed or strict experience. Remember, Astro is TypeScript.
    • // @ts-check has been added to all the examples config files
    • astro check is no longer enabled by default for the build command
  • A new question allowing to choose an adapter has been added
  • create-astro now takes a --add flag, allowing one to add a bunch of integrations in one command.

Basic example rework

The basics template has been reworked to provide a more minimal template, allowing it to serve as a mix between "Basics" and "Minimal":

  • The theme of the basics template has been moved into a built-in "Welcome" component exported from Astro directly. The source code of that component is plain .astro, allowing one to still inspect how you'd achieve things in Astro. This component takes in a props to customise the title, still allowing for the implicit teaching of props. A very basic layout (similar to Emmet's doc command) is included, both to setup basic HTML stuff and teach the user about templates / slots

Testing

Added / updated tests

Docs

We'll update the docs:tm:

Copy link

changeset-bot bot commented Sep 27, 2024

🦋 Changeset detected

Latest commit: eb51757

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

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

@Princesseuh Princesseuh marked this pull request as draft September 27, 2024 08:58
@github-actions github-actions bot added the pkg: create-astro Related to the `create-astro` package (scope) label Sep 27, 2024
@github-actions github-actions bot added the pkg: example Related to an example package (scope) label Sep 27, 2024
@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Sep 27, 2024
@TheOtterlord
Copy link
Member

TheOtterlord commented Sep 27, 2024

Todo:

@Princesseuh Princesseuh marked this pull request as ready for review September 27, 2024 19:42
// @ts-ignore
export { default as Code } from './Code.astro';
// @ts-ignore
export { default as Debug } from './Debug.astro';
// @ts-ignore
export { default as WelcomeScreen } from './WelcomeScreen.astro';
Copy link
Member

Choose a reason for hiding this comment

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

Maybe Welcome instead of WelcomeScreen?

'create-astro': minor
---

Add a question to ask the user which adapter to add. Add an `--add` flag taking a list of integration.
Copy link
Member

Choose a reason for hiding this comment

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

Need to talk about TS changes as well

Copy link
Contributor

Choose a reason for hiding this comment

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

I think --add should be split to a separate PR to avoid blocking on this review. Sounds it like we can release that independently.

@florian-lefebvre florian-lefebvre linked an issue Sep 28, 2024 that may be closed by this pull request
1 task
Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
@Princesseuh Princesseuh marked this pull request as draft September 28, 2024 18:04
@@ -0,0 +1,172 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

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

I think moving the original design here was smart for keeping this PR reviewable! Still, I recall that @FredKSchott wanted to use this as an opportunity to explore a new, more expressive design.

May become a blocker to make the new starter more of a feature we promote. Still on the fence whether merging this change in code structure without a redesign is a good idea.

Copy link
Member Author

Choose a reason for hiding this comment

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

For what it's worth, this is on the next branch, so it would only affect new projects using the beta. Even if we merge this right now, there's plenty of time to make the new design before the actual release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pkg: create-astro Related to the `create-astro` package (scope) pkg: example Related to an example package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create astro --no => typescript == strict, instead of "no"
4 participants