mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
workspace: build时忽略空文件夹
This commit is contained in:
1 parent
9aedeb33b3
commit
9d5de44b7e
1 file changed
+1
@@ -54,6 +54,7 @@ console.log(packages);
|
||||
for (const package of packages) {
|
||||
if (package !== 'hydrooj') config.references.push({ path: `packages/${package}` });
|
||||
const files = fs.readdirSync(path.resolve(process.cwd(), 'packages', package));
|
||||
if (!files.includes('src') && !files.map(n => n.split('.')[1]).includes('ts')) continue;
|
||||
fs.writeFileSync(
|
||||
path.resolve(process.cwd(), 'packages', package, 'tsconfig.json'),
|
||||
files.includes('src') ? JSON.stringify(configSrc) : JSON.stringify(configFlat),
|
||||
|
||||
Reference in new issue
Block a user