Skip to content

Commit

Permalink
feat(create-vite): scaffold directory with only .git (#7971)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Apr 30, 2022
1 parent 891e7fc commit a5bdb9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/create-vite/index.js
Expand Up @@ -313,7 +313,8 @@ function copyDir(srcDir, destDir) {
}

function isEmpty(path) {
return fs.readdirSync(path).length === 0
const files = fs.readdirSync(path)
return files.length === 0 || (files.length === 1 && files[0] === '.git')
}

function emptyDir(dir) {
Expand Down

0 comments on commit a5bdb9f

Please sign in to comment.