- Notifications
You must be signed in to change notification settings - Fork477
feat: new--bare
CLI option to generate a barebone project without example code#636
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Closesvuejs#112Closesvuejs#300The minimal template is a cut-down version of the default template;therefore, the `--minimal` flag is mutually exclusive with all other flags.I chose not to include it in the prompts because it's a very specificuse case, and it's not a good idea to clutter the CLI with too manyoptions that are not commonly used.I didn't design it as an add-on because the logic would be too complex,and the use case would be even more niche.
I was leaning toward an option that would not be mutually exclusive of the others (and I think the linked issues were also asking for this). I would like to see a Or maybe even change the default behavior to generate a lighter version. |
I think I can expand it to work with other options with some effort. But what should we do when |
I think the complaint is mostly that the default setup is too verbose and the first thing you have to do after creating a new project is to delete all the components, all the CSS and assets etc. Angular CLI for example only generates the That's why I would even consider simplifying the default instead of adding another option. |
--minimal
option--bare
flag to generate a template without too much boilerplatehaoqunjiang commentedDec 12, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Refactored!
IMO we still need some kind of example code for new users, so the default is a bit more verbose than the ones in I'm open to the idea of making the templates "easier to delete", but I need help on that. |
runyasak commentedDec 12, 2024
I absolutely love and agree with the "easier to delete" approach, as mentioned in Evan's feedback. In my opinion, adding one more prompt to ask about the bare configuration, with a sensible default choice, would be easier for new users who might not notice this feature in the docs. Additionally, we can provide a As an Angular user, I appreciate how the Angular CLI simplifies things with just prompts for the project name and stylesheet format, followed by generating a bare project. However, without some example components, it can be challenging for newcomers to understand the structure or workflow without reading the docs. For my suggestion, I propose adding a |
I just tried this locally, and I found it made little difference compared to the current approach… I also tried moving markups in Anyway, even with all those experiments, I find the essential workflow in this PR still works, so I believe we can move forward with this implementation. Now we need to decidewhether to add a user-facing prompt for this feature. |
I have no stronger opinion about a user-facing prompt. If we go with it, I would use something other than "instructions", as it feels like you'll get a tutorial. I haven't tested the PR, but I think we should add the |
runyasak commentedDec 17, 2024
@haoqunjiang In my opinion, I would move the
@cexbrayat I agree with using something other than "instructions" or adding more options in the tutorial. For now, I believe adding the |
😂 I have to open another PR to refactor the CI first, because the job matrix would become way too complex after adding yet another flag… |
The ['router', 'pinia'] combination is already included in the result ofthe fullCombination function, so it's redundant.It's there because it was originally ['devtools', 'router', 'pinia'],but now devtools is always included, I forgot to delete this line duringthe refactor.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
runyasak commentedDec 22, 2024
I just noticed the Vue template onStackBlitz. It includes only As a Vue user, I personally don’t see a need for both If we decide to go further with restructuring the folders and merging some files—similar to theStackBlitz approach—it could make starting a project simpler and help users follow consistent patterns. These are just my ideas. ![]() |
StackBlitz pulls from
We don't use If you are using Tailwind, you might have encountered it too, just in different forms: the |
runyasak commentedDec 22, 2024
I’m sorry for mistakenly recalling the wrong file name.
That’s a good approach for developing projects. I’ve sometimes mixed them into a single file, but I realize now that separating reset CSS into one file and global styles into another is a good practice. @haoqunjiang Thank you for teaching me how to better manage styles in projects. 😁 |
Let's merge this PR now. Thanks for all the reviews! Regarding the remaining undecided matters like the |
b3d661e
intovuejs:mainUh oh!
There was an error while loading.Please reload this page.
--bare
flag to generate a template without too much boilerplate--bare
CLI option to generate a barebone project without example code
Uh oh!
There was an error while loading.Please reload this page.
Closes#112
Closes#186
Closes#300
Closes#637
The minimal template is a cut-down version of the default template;therefore, the
--minimal
flag is mutually exclusive with all other flags.I chose not to include it in the prompts because it's a very specific
use case, and it's not a good idea to clutter the CLI with too many
options that are not commonly used.
I didn't design it as an add-on because the logic would be too complex,and the use case would be even more niche.