aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/packages/create-turbo/src/utils/isFolderEmpty.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/create-turbo/src/utils/isFolderEmpty.ts')
-rw-r--r--packages/create-turbo/src/utils/isFolderEmpty.ts37
1 files changed, 0 insertions, 37 deletions
diff --git a/packages/create-turbo/src/utils/isFolderEmpty.ts b/packages/create-turbo/src/utils/isFolderEmpty.ts
deleted file mode 100644
index 4de2d58..0000000
--- a/packages/create-turbo/src/utils/isFolderEmpty.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import fs from "fs-extra";
-
-const VALID_FILES = [
- ".DS_Store",
- ".git",
- ".gitattributes",
- ".gitignore",
- ".gitlab-ci.yml",
- ".hg",
- ".hgcheck",
- ".hgignore",
- ".idea",
- ".npmignore",
- ".travis.yml",
- "LICENSE",
- "Thumbs.db",
- "docs",
- "mkdocs.yml",
- "npm-debug.log",
- "yarn-debug.log",
- "yarn-error.log",
- "yarnrc.yml",
- ".yarn",
-];
-
-export function isFolderEmpty(root: string): {
- isEmpty: boolean;
- conflicts: Array<string>;
-} {
- const conflicts = fs
- .readdirSync(root)
- .filter((file) => !VALID_FILES.includes(file))
- // Support IntelliJ IDEA-based editors
- .filter((file) => !/\.iml$/.test(file));
-
- return { isEmpty: conflicts.length === 0, conflicts };
-}