-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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 <49056869+sapphi-red@users.noreply.github.com>
…ort, improve defaults Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
…ult initialValue Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
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 <49056869+sapphi-red@users.noreply.github.com>
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 <49056869+sapphi-red@users.noreply.github.com>
Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
@copilot on second thought the previous one is fine. check the env var named |
Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
Updated to use |
Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
@copilot CI is failing |
Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
@copilot fix the type error that is happening with |
Co-authored-by: sapphi-red <49056869+sapphi-red@users.noreply.github.com>
Co-authored-by: ivan <sun_day500@163.com>
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.