From 6ac3ea11f2ee842c47c9beba7e2d371d478b446f Mon Sep 17 00:00:00 2001 From: undefined Date: Sat, 10 Sep 2022 16:45:47 +0800 Subject: [PATCH] workspace: ensure plugins dir --- build/prepare.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/prepare.js b/build/prepare.js index 5d1f8115..36753df6 100644 --- a/build/prepare.js +++ b/build/prepare.js @@ -68,6 +68,10 @@ fs.writeFileSync(path.resolve(process.cwd(), 'packages', 'ui-default', 'tsconfig }, })); +if (!fs.existsSync(path.resolve(process.cwd(), 'plugins'))) { + fs.mkdirSync(path.resolve(process.cwd(), 'plugins')); +} + for (const type of ['packages', 'plugins']) { const packages = fs.readdirSync(path.resolve(process.cwd(), type)); for (const package of packages) { @@ -94,6 +98,3 @@ for (const type of ['packages', 'plugins']) { } } fs.writeFileSync(path.resolve(process.cwd(), 'tsconfig.json'), JSON.stringify(config)); -if (!fs.existsSync(path.resolve(process.cwd(), 'plugins'))) { - fs.mkdirSync(path.resolve(process.cwd(), 'plugins')); -}