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): support auto install dependencies and start dev #12248

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sun0day
Copy link
Member

@sun0day sun0day commented Mar 1, 2023

Description

option description
-i,--immediate install dependencies and start dev(boolean)
-a,--agent install dependencies via npm,yarn,pnpm(string)

Additional context

create-vite


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 PR Title 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.

@stackblitz
Copy link

stackblitz bot commented Mar 1, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@patak-dev
Copy link
Member

I tried this locally, by:

pnpm run build
cd packages/create-vite
node ./index.js

And it looks like the auto-install didn't kick in (I choose Vue -> Typescript) 🤔

@sun0day
Copy link
Member Author

sun0day commented Mar 2, 2023

I tried this locally, by:

pnpm run build
cd packages/create-vite
node ./index.js

And it looks like the auto-install didn't kick in (I choose Vue -> Typescript) 🤔

node dist/index.mjs ?

image

@patak-dev
Copy link
Member

Oh, scratch that. It worked, but I expected to see a lock file and not only node_modules. Also, I will navigate into the folder automatically and start the app (like in sli.dev)

Have you seen this issue and PR @sun0day?

@sun0day
Copy link
Member Author

sun0day commented Mar 2, 2023

Oh, scratch that. It worked, but I expected to see a lock file and not only node_modules. Also, I will navigate into the folder automatically and start the app (like in sli.dev)

Have you seen this issue and PR @sun0day?

Nooo... I didn't search that. But this is exactly what I want to add to vite. My pr is still a draft, I'd like to discuss with the team about whether this is a valuable enhancement first.

BTW, why was that pr closed ?

@patak-dev
Copy link
Member

I think it would be better to keep working on the PR to have the complete flow in this case. I don't know why the PR was closed to be honest, maybe you could check out the code and see if the implementation could be used as a base (also checking the implementation in sli.dev that seems to be working well)

@sun0day
Copy link
Member Author

sun0day commented Mar 3, 2023

ok. but here is a small problem, I see that create-vite integrate 3rd-party cli tools. It may break their prompt output flow if add auto-install and auto-start to them. So should we just add these features to create-vite's own prompt flow?

I implemented an initial version. @patak-dev cc

@sun0day sun0day force-pushed the feat/autoInstall branch from a360c72 to ff062e3 Compare March 3, 2023 15:16
@sun0day sun0day changed the title feat(create-vite): support auto install dependencies feat(create-vite): support auto install dependencies and start dev Mar 3, 2023
@bluwy bluwy added the p2-to-be-discussed Enhancement under consideration (priority) label Sep 19, 2023
@bluwy
Copy link
Member

bluwy commented Oct 23, 2024

In the last meeting (which happened in a very long time ago but we didn't give an update sorry 😬), we agree that this would be nice to have. We just need someone to review and rebase the PR.

@sapphi-red sapphi-red added p2-nice-to-have Not breaking anything but nice to have (priority) and removed p2-to-be-discussed Enhancement under consideration (priority) labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants