Skip to content

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

Merged
patak-cat merged 7 commits intovitejs:mainfrom
haoqunjiang:feat-opt-in-create-vue
Aug 26, 2022
Merged

feat(create-vite): add support for custom init commands (create-vue, Nuxt, and SvelteKit)#9406
patak-cat merged 7 commits intovitejs:mainfrom
haoqunjiang:feat-opt-in-create-vue

Conversation

@haoqunjiang
Copy link
Copy Markdown
Member

@haoqunjiang haoqunjiang 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-cat
patak-cat previously approved these changes Jul 28, 2022
Copy link
Copy Markdown
Member

@patak-cat patak-cat 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-cat patak-cat added the p2-nice-to-have Not breaking anything but nice to have (priority) label Jul 28, 2022
Copy link
Copy Markdown
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!

@patak-cat patak-cat 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-cat patak-cat 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