-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
vue create . does not allow upper case letters. Causes headaches when integrating into existing project #5032
Comments
Makes sense. |
closes vuejs#2547 closes vuejs#5032 I'm still very hesitant on adding this feature, though. First, this change allows project creation in a folder with uppercase letters in its name. It is strongly discouraged and may cause many weird issues all over the ecosystem. For example, vuejs#5022, vuejs#4424, vuejs#3665, vuejs#4174#issuecomment-569709494 are all caused by case issues. Adding support for uppercase project names will only worsen this situation. Secondly, it adds a lot of maintenance burden to us. As noted in the comments, these prompts are hard to test right now (because `createTestProject` runs in another process so it's hard to intercept the prompts). Even if such test utilities are added in the future, it's still very tedious to take care of all the case issues in the test suite. What's worse is that we can affect the project folders created by @vue/cli by converting the project name to lower case. But for `vue create .`, we cannot change the current folder's name. So, we'll have another edge case to test.
After a second thought, I'm now hesitant about adding this feature. See the notes at #5096 |
Any more considerations on this? My current solution is to simply rename the directory Vue gives me after I run |
Capital letters are no longer allowed. Supersedes vuejs#5096 (see more reasoning in that PR) closes vuejs#2547 closes vuejs#5032 closes vuejs#6436
What problem does this feature solve?
When integrating vue into existing web frameworks like Aspnet you cannot install into the root web project unless your aspnet web projects folder is all lower case.
Most guidelines on the web say to make a sub folder called app that you stuff everything into. That seems like a hack. I assume the casing restriction is due to npm package.json restrictions.
What does the proposed API look like?
Allow users to create a package.json file ahead of time and take the name from that instead.
So steps to add vue to existing project could be
npm init --yes
vue create .
If the naming restriction goes beyond package.json, just add a --lower-name flag or something.
The text was updated successfully, but these errors were encountered: