Giter VIP home page Giter VIP logo

Comments (8)

jrson83 avatar jrson83 commented on July 24, 2024 1

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.

jrson83 avatar jrson83 commented on July 24, 2024

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.

brillout avatar brillout commented on July 24, 2024

👍

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.

jrson83 avatar jrson83 commented on July 24, 2024

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.

brillout avatar brillout commented on July 24, 2024

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.

jrson83 avatar jrson83 commented on July 24, 2024

Okay, I'll post a preview if its ready.

from create-vite-plugin-ssr.

jrson83 avatar jrson83 commented on July 24, 2024

First scenario:

Directory vite-app exists and has files in it. The user presses <r> and renames the targetDir.

2022-04-16_20h42_17

Second scenario:

Directory vite-app exists and has files in it. User presses <return>.

2022-04-16_20h43_47

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.

brillout avatar brillout commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.