fix(build): Write swagger.json only once

This commit is contained in:
Maksim Eltyshev
2026-03-12 15:24:41 +01:00
parent af0cd79535
commit 61a3ff55cc
+3 -3
View File
@@ -41,9 +41,9 @@ const build = (src, dest) => {
fs.copyFileSync(srcPath, destPath); fs.copyFileSync(srcPath, destPath);
} }
} }
const specification = swaggerJsdoc(swaggerConfig);
fs.writeFileSync(path.join(dest, 'swagger.json'), JSON.stringify(specification, null, 2));
}; };
build('./', OUT_DIR); build('./', OUT_DIR);
const specification = swaggerJsdoc(swaggerConfig);
fs.writeFileSync(path.join(OUT_DIR, 'swagger.json'), JSON.stringify(specification, null, 2));