-
-
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" in current directory #1509
Comments
You can pass in an existing directory's name and you'll be prompted whether to overwrite or merge any existing files. Does that not solve the use case already? |
Well, yes, but it removes for some reason the local dev installation of vue-cli. Is it intended? |
One limitation of this is folder names that aren't valid project names. For instance, I may have an Possible syntax: # Syntax
vue create [options] <app-name> [folder-name]
# Example - Default to .\app-name folder
vue create app-name
# Example - Current Folder
vue create app-name .
# Example - Specified Folder
vue create app-name .\App.UI\
It could also just be a new option with the same behaviors as described above: Options:
-l, --location Use specified location when creating project |
Creating project in current directory is already supported by running |
you can't do this with vue ui - it just throws an error if the folder already exists. New issue? |
Yeah, I got this error too. It gave me a warning that the folder already exists at the start of the process and asked me if I wanted to overwrite it, so I said no, but then at the end when I went to create, it said the folder already exists and wouldn't continue (v3.5.1) |
…[ci skip] In #1509 it is shown that a new project can be created in the an existing directory. This is a common scenario (e.g. creating a repo on GitHub, cloning it, and then running `vue create`). This commit makes this functionality more well known.
Just try |
This works but if one has a folder with a preexisting package.json, |
If you don't have the Vue CLI installed globally you can still use
It takes a while so go grab a latte or something. You can also install it (again) as a devDependency in your new app to use |
|
this is the only thing that worked for me. i wanted to avoid installing the vue cli globally since the yarn docs said it was a bad idea to globally install packages, because you dont get the cli version in the package.json file: https://classic.yarnpkg.com/en/docs/cli/add#toc-caveats also i found |
Yeah, if the folder naming doesn't follow the package naming conventions, you have to 1. rename the folder, 2. create the app, 3. rename the folder back. |
What problem does this feature solve?
Currently the only option, I'm aware of, to create a new project is to let vue-cli create it's folder from scratch somewhere in the current directory as a subfolder. I'd like an option to create the project in the directory where vue-cli command was invoked.
What does the proposed API look like?
# when run without specifiying project's name, vue-cli would use the current dir's name and place all the new files in the current directory vue create
The text was updated successfully, but these errors were encountered: