Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Allow for creating app inside current directory like Vue CLI #582

Closed
lloydjatkinson opened this issue Aug 2, 2020 · 7 comments
Closed

Comments

@lloydjatkinson
Copy link

lloydjatkinson commented Aug 2, 2020

Vue CLI allows the user to create a new app inside the current directory, and it will name the app the same as the directory:

vue create .

The use case for this is that it's really common to first create a repository (e.g. on GitHub), clone it, and then create the new app.

Right now to do the same with create-nuxt-app the user has to run (eg the repo name is my-website.com):

npx create-nuxt-app my-website.com

This means you end up with my-website.com\my-website.com and then you need to basically move the contents up one directory to be in the root.

@kalnode
Copy link

kalnode commented Aug 16, 2020

I agree with the use case.

For reference, you can just move all the files from the newly created sub-folder, into the root of the repo.

@fu9da
Copy link

fu9da commented Nov 15, 2020

In v3.4.0, you can specify the current directory and execute.
But the specified directory must be empty.

Can't create . because there's already a non-empty directory . existing in path.

As a result, it seems that there are many cases where it is used as described above.

As mentioned in #556 (comment),
I would be happy if there is a way to byapass this, such as with --force.

@lloydjatkinson
Copy link
Author

You can, but if there is a hidden .git directory from the previously mentioned “creating it on GitHub first” it won’t work.

@lloydjatkinson
Copy link
Author

This is still an issue that would make life much easier if fixed

@blackeuler
Copy link

What would need to be done to make this happen?

@matgnt
Copy link

matgnt commented May 6, 2021

it's also a problem when working with Visual Studio Code and DevContainers [1]. Then you always have a hidden ".devcontainer" directory there and you always have to create the nuxt app in a sub-directory.

[1] https://code.visualstudio.com/docs/remote/containers

@clarkdo
Copy link
Member

clarkdo commented Jun 27, 2021

#799 (--overwrite-dir) has been merged and released

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants