diff options
| author | 2023-11-03 21:25:40 +0800 | |
|---|---|---|
| committer | 2023-11-03 21:25:40 +0800 | |
| commit | 9029588590bea8b10451575c5142dcde77ecd1b5 (patch) | |
| tree | 04cf8aee56c23fd225ff19d340f7cee621d874ef /packages/create-turbo/src/utils/isFolderEmpty.ts | |
| parent | 94071d7ce16c56641d67d488e2bac6be84ffe731 (diff) | |
| download | HydroRoll-9029588590bea8b10451575c5142dcde77ecd1b5.tar.gz HydroRoll-9029588590bea8b10451575c5142dcde77ecd1b5.zip | |
chore: delete useless files
Diffstat (limited to 'packages/create-turbo/src/utils/isFolderEmpty.ts')
| -rw-r--r-- | packages/create-turbo/src/utils/isFolderEmpty.ts | 37 |
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 }; -} |
