Create-nuxt-app: Allow for creating app inside current directory like Vue CLI

Created on 2 Aug 2020  Â·  3Comments  Â·  Source: nuxt/create-nuxt-app

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.

Most helpful comment

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

All 3 comments

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.

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 https://github.com/nuxt/create-nuxt-app/issues/556#issuecomment-674555335,
I would be happy if there is a way to byapass this, such as with --force.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

artmarydotir picture artmarydotir  Â·  4Comments

jericopulvera picture jericopulvera  Â·  4Comments

manniL picture manniL  Â·  3Comments

mikeglopez picture mikeglopez  Â·  10Comments

OndrejCibulka picture OndrejCibulka  Â·  6Comments