-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
feat(create-vite): support auto install dependencies and start dev #20468
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: sapphi-red <[email protected]>
…ort, improve defaults Co-authored-by: sapphi-red <[email protected]>
…ult initialValue Co-authored-by: sapphi-red <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests are failing
Co-authored-by: sapphi-red <[email protected]>
Fixed the test failures! The issues were:
All immediate and agent flag tests now pass. Commit: 1bbb19f |
…re immediate logic, remove test-debug-node Co-authored-by: sapphi-red <[email protected]>
Co-authored-by: sapphi-red <[email protected]>
@copilot CI is failing |
Co-authored-by: sapphi-red <[email protected]>
@copilot fix the type error that is happening with |
Co-authored-by: sapphi-red <[email protected]>
Co-authored-by: ivan <[email protected]>
Co-authored-by: Bjorn Lu <[email protected]>
Co-authored-by: Bjorn Lu <[email protected]>
I think it's cool that the install logs is indented together, but I'm a little not sure about it since it disables clearScreen when installing.
click to open pnpm logs
I'm not sure if this can be fixed while indenting, but I think leaving stdio inherit is probably the safest. |
Oh, that's true. Let's leave it inherit then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Summary
This PR adds support for automatically installing dependencies and starting the dev server when creating a new Vite project, rebasing the functionality from PR #12248.
New Features
Two new command-line options have been added:
-i, --immediate
: Automatically install dependencies and start dev server (boolean)-a, --agent
: Specify which package manager to use (npm, yarn, pnpm)Usage Examples
Interactive Mode with New Prompts
Command Line Flags
Updated Help Message
Implementation Details
mri
configuration to support the new flags with appropriate aliases@clack/prompts
that integrate seamlessly with existing workflowrun
,install
,start
) for safe package manager command executionChanges Made
Core Functionality
-i/--immediate
and-a/--agent
flagsTesting
-i false
to prevent interference)Code Quality
Manual Testing Verified
✅ Help message displays new options correctly
✅ Interactive mode shows new prompts in logical order
✅
--immediate false
preserves existing behavior✅
--immediate true --agent npm
successfully installs and starts dev server✅ Package manager selection works for npm, yarn, and pnpm
✅ All existing functionality works without breaking changes
Breaking Changes
None. This is a backwards-compatible enhancement that adds new optional functionality.
close #12248
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.