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

feat(create-vite): add support for custom init commands (create-vue, Nuxt, and SvelteKit) #9406

Merged
merged 7 commits into from Aug 26, 2022

Conversation

sodatea
Copy link
Member

@sodatea sodatea commented Jul 28, 2022

Description

Fixes #9317

The outcome:

Kapture.2022-07-28.at.17.12.16.mp4

I've also published a package called create-soda-test on npm, so that you can test it with package managers (e.g. pnpm create soda-test) to see if calling npm create inside npm create really works.

Additional context

I also changed the prompts a little bit, but they are in separate commits, so if this PR gets accepted, please don't squash the commits.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

So that the casing is consistent between frameworks and variants
Added a few convention here:
1. Options with custom init commands should have the name starting with
`custom-`;
2. The custom init command can have a placeholder called `TARGET_DIR`,
as the target directory for the project to be created in.
patak-dev
patak-dev previously approved these changes Jul 28, 2022
Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

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

This looks awesome!

@patak-dev patak-dev added the p2-nice-to-have Not breaking anything but nice to have (priority) label Jul 28, 2022
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

Sweet!

packages/create-vite/index.js Outdated Show resolved Hide resolved
packages/create-vite/index.js Outdated Show resolved Hide resolved
@patak-dev patak-dev added p3-significant High priority enhancement (priority) and removed p2-nice-to-have Not breaking anything but nice to have (priority) labels Aug 16, 2022
@sapphi-red sapphi-red mentioned this pull request Aug 26, 2022
9 tasks
@patak-dev patak-dev merged commit 1673f3d into vitejs:main Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-significant High priority enhancement (priority)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add a prompt to opt-in create-vue/create-svelte... in create-vite
6 participants