diff --git a/.gitignore b/.gitignore index fca394d..8579aaa 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,3 @@ src/assets/index.ts src/components/index.ts src/utils/index.ts src/types/index.ts -src/index.ts diff --git a/makeIndex.ts b/makeIndex.ts index 8d30855..ee4644c 100644 --- a/makeIndex.ts +++ b/makeIndex.ts @@ -1,6 +1,6 @@ import { writeFileSync } from "fs"; import { glob } from "glob"; -import { rmSync } from "node:fs"; +import { existsSync, rmSync } from "node:fs"; import path from "path"; const Dirs = [{ @@ -24,7 +24,9 @@ const SrcRe = /^src/; const mainIndex: string[] = []; for (const { dir, match, name } of Dirs) { const output: string[] = []; - rmSync(`${dir}/index.ts`); + if (existsSync(`${dir}/index.ts`)) { + rmSync(`${dir}/index.ts`); + } const files = glob.sync(`${dir}${match}`); for (const file of files) { const extension = path.extname(file); diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index 059a454..0000000 --- a/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { default as BaseButton } from "@/components/BaseButton.vue"; - -export { default as BaseContextMenu } from "@/components/BaseContextMenu.vue";