vuejs / create-vue

🛠️ The recommended way to start a Vite-powered Vue project
Other
3.68k stars 421 forks source link

Created project is way too complex, not an actual scaffold #300

Open christophfriedrich opened 1 year ago

christophfriedrich commented 1 year ago

How is this officially "The recommended way to start a Vite-powered Vue project"?! It does create such a project, but before I can start coding my own actual project, I have to delete a ton of garbage: Components I don't need, CSS I don't need, logos and icons I don't need...

In its current state, this project creates a good example for beginners that shows off a few of Vue's features and gives links for further reading. But it massively fails at just providing an empty template from which to start one's own project. I was expecting a scaffold, which means the minimal setup to get it to run and say something like "Hello World", nothing more.

Like @ZackPlauche said it in #186: "I want the same thing, but minus all of the starter components and css." I opened a new issue because

  1. over the past 8 months that issue didn't get any attention (except, notably, five thumbs-up reactions of people thinking the same) and
  2. he titled his issue a "question", whereas I see mine more as a bug report, in the sense of "this software does not do what it is supposed to do, please fix".
remiconnesson commented 1 year ago

"The recommended way to start a Vite-powered Vue project"?

What matter is to set up the tooling like typescript, vitest , e2e test, vite etc...

I have to delete a ton of garbage: Components I don't need, CSS I don't need, logos and icons I don't need...

Imho your making it sound harder than it actually is, you can quite easily rm -rf src...

Then, replace public/favicon.ico and modify index.html to set the title etc..

and then add those files and you get yourself a starter

src/App.vue

<template>
<h1>Hello World</h1>
</template>

src/main.ts

import { createApp } from 'vue'
import App from './App.vue'

createApp(App).mount('#app')

If you want to make this faster you can create a script that does this in one command,

(the most complicated part will be the regex to change the title I guess)?

you could also have a variation to add the boilerplate for the router / for pinia

luckydonald commented 1 week ago

I mean it could simply be an option, e.g.

✔ Project name: … <your-project-name>
✔ Add TypeScript? … No / Yes
…
✔ Add Vue DevTools 7 extension for debugging? (experimental) … No / Yes
✔ Include useful sample code to get you started … No / Yes    ❇️ New ❇️
christophfriedrich commented 1 week ago

@luckydonald At first I liked the idea, but then realised that intuitively I would select "Yes" on that and then still end up with all the garbage... The question would rather need to be: "Include overly complex demo application instead of a simple Hello World?"

@remiconnesson Of course I can do all that manual adjustment, but then what's the point of using a scaffold? Why not put exactly what you described as the default? It may all be obvious to you, but when one is not as experienced, it's annoying having to sort through everything to evaluate whether it's really needed or not.

A scaffold should be a minimal setup, not an advertisement page.