what the hell did i do?

This commit is contained in:
2026-05-20 18:14:53 +02:00
parent 59d7db73f1
commit 42e3d55cf4
+5 -3
View File
@@ -23,14 +23,16 @@ function parsePluginConfig(filePath) {
if (pluginConfig.frontEndPath) { if (pluginConfig.frontEndPath) {
const sourcePath = path.join(path.dirname(filePath), pluginConfig.frontEndPath); const sourcePath = path.join(path.dirname(filePath), pluginConfig.frontEndPath);
const destinationDir = path.join(__dirname, '../web/js/plugins', path.dirname(pluginConfig.frontEndPath));
// Check if the source path exists
const destinationDir = path.join( const destinationDir = path.join(
__dirname, __dirname,
'../web/js/plugins', '../web/js/plugins',
path.relative(pluginsDir, path.dirname(sourcePath)) path.relative(pluginsDir, path.dirname(sourcePath))
); );
// Check if the source path exists
if (!fs.existsSync(sourcePath)) {
console.error(`Error: source path ${sourcePath} does not exist.`);
return pluginConfig;
}
// Check if the destination directory exists, if not, create it // Check if the destination directory exists, if not, create it
if (!fs.existsSync(destinationDir)) fs.mkdirSync(destinationDir, { recursive: true }); // Create directory recursively if (!fs.existsSync(destinationDir)) fs.mkdirSync(destinationDir, { recursive: true }); // Create directory recursively