mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-07-30 16:59:15 +02:00
redo thing
This commit is contained in:
+5
-4
@@ -26,10 +26,11 @@ function parsePluginConfig(filePath) {
|
|||||||
const destinationDir = path.join(__dirname, '../web/js/plugins', path.dirname(pluginConfig.frontEndPath));
|
const destinationDir = path.join(__dirname, '../web/js/plugins', path.dirname(pluginConfig.frontEndPath));
|
||||||
|
|
||||||
// Check if the source path exists
|
// Check if the source path exists
|
||||||
if (!fs.existsSync(sourcePath)) {
|
const destinationDir = path.join(
|
||||||
console.error(`Error: source path ${sourcePath} does not exist.`);
|
__dirname,
|
||||||
return pluginConfig;
|
'../web/js/plugins',
|
||||||
}
|
path.relative(pluginsDir, path.dirname(sourcePath))
|
||||||
|
);
|
||||||
|
|
||||||
// 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
|
||||||
|
|||||||
Reference in New Issue
Block a user