Comments (8)
Neat 👍. That's what I imagined.
Nice, I'm glad you like it 👍
Why? What's wrong with simply doing mv vite-app my-new-project?
Well, it's Okay, I guess it might be unfamiliar to some users, since most create-apps
offer that feature.
But if we just indicate at the installer Docs, that the CLI does not accept args
I'll be fine. 😆
I'll optimize the code and update the repo later today.
from create-vite-plugin-ssr.
Yeah, I was thinking almost the same, as you said there should be only a default dir name.
If the default project directory will be ./vite-app
and the directory already exists and has files in it, we must pause the create-app process and we then should inform the user and provide a way to solve the conflict.
Since you didn't like ink-selects
that much, I think the warning message would be good from the current generator in combination:
⚠ Target directory vite-app/ is not empty.
Press <r> to rename the directory, <return> to remove existing files and continue.
If the user presses <r>
, the input like I already created it for project name will popup. (This popup was not ment to define a package.json#name
, but for the project directory name, I just used the message from current create-app Project name
.
This is all in all a good idea, I will implement it.
from create-vite-plugin-ssr.
👍
we must pause the [...] process
I think showing the warning right away at the first screen will be enough.
So we keep one screen and one step.
from create-vite-plugin-ssr.
I think showing the warning right away at the first screen will be enough.
Ah Okay, I didn't get that. So you mean, when the user executes the CLI, it auto checks if the directory vite-app
already exists inside the current working directory? And if so then shows the warning before the user can interact with the selectOptions?
Oh and one more question. When the user presses <r>
, types and confirms a new directory name, do you mean the existing directory should be renamed, or the targetDir
of the current installation? (I think target dir would for sure be better).
from create-vite-plugin-ssr.
And if so then shows the warning before the user can interact with the selectOptions?
How about we show the warning below the selectOptions table? So that everything stays single-step.
I think target dir would for sure be better
Yes.
from create-vite-plugin-ssr.
Okay, I'll post a preview if its ready.
from create-vite-plugin-ssr.
First scenario:
Directory
vite-app
exists and has files in it. The user presses<r>
and renames thetargetDir
.
Second scenario:
Directory
vite-app
exists and has files in it. User presses<return>
.
Side note: The programming effort is much more complex, if we do it like this.
I would still prefer to have the default option to set a directory.
adonis new yardstick
vue create hello-world
npx create-react-app my-app
ng new my-first-project
npx preact-cli create
npm create vite@latest my-vue-app -- --template vue
But we can go like this if you definitely want it.
from create-vite-plugin-ssr.
Neat 👍. That's what I imagined.
I would still prefer to have the default option to set a directory.
Why? What's wrong with simply doing mv vite-app my-new-project
?
from create-vite-plugin-ssr.
Related Issues (7)
- MVP
- Scaffolding Logic HOT 16
- CLI selectOption conditions HOT 1
- Restructuring concepts and implementation HOT 6
- Monorepo architecture HOT 3
- Use Vitest HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create-vite-plugin-ssr.