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

Ignore .git directory when checking if outDir is empty #823

Open
lukecarr opened this issue Jul 13, 2021 · 0 comments
Open

Ignore .git directory when checking if outDir is empty #823

lukecarr opened this issue Jul 13, 2021 · 0 comments

Comments

@lukecarr
Copy link

(Semi-related to #582, but not a duplicate)

It would be really handy if the .git directory is ignored when [out-dir] is checked for existing contents. Adding --overwrite-dir in v3.7.0 was a step in the right direction, but I (and I believe many others) would still prefer the safety of not using a forceful operation when running the cli in a cloned empty repository (with a .git directory).

A common workflow for many is:

  • Clone empty repository.
  • Run create-nuxt-app without providing an outDir.
  • Get an error because the directory technically isn't empty (.git).
  • Re-run create-nuxt-app providing an outDir.
  • Immediately copy all of the generated files out of the outDir into the root of the repository.
  • Delete the leftover outDir.

This is obviously a fairly opinionated issue, but I'd love to hear some counter arguments.

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

1 participant