adminforth 1.0.79 → 1.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -394,7 +394,12 @@ class CodeInjector {
|
|
|
394
394
|
watchCustomComponentsForCopy(_a) {
|
|
395
395
|
return __awaiter(this, arguments, void 0, function* ({ verbose }) {
|
|
396
396
|
const customComponentsDir = this.adminforth.config.customization.customComponentsDir;
|
|
397
|
-
|
|
397
|
+
// check dir exists
|
|
398
|
+
try {
|
|
399
|
+
yield fs.promises.access(customComponentsDir, fs.constants.F_OK);
|
|
400
|
+
}
|
|
401
|
+
catch (e) {
|
|
402
|
+
console.log(`Custom components dir "${customComponentsDir}" does not exist, feel free to create it place custom assets and Vue files there`);
|
|
398
403
|
return;
|
|
399
404
|
}
|
|
400
405
|
// check if folder exists
|
|
@@ -418,9 +423,7 @@ class CodeInjector {
|
|
|
418
423
|
}
|
|
419
424
|
}
|
|
420
425
|
});
|
|
421
|
-
|
|
422
|
-
yield collectDirectories(customComponentsDir);
|
|
423
|
-
}
|
|
426
|
+
yield collectDirectories(customComponentsDir);
|
|
424
427
|
const watcher = filewatcher();
|
|
425
428
|
directories.forEach((dir) => {
|
|
426
429
|
watcher.add(dir);
|
package/modules/codeInjector.ts
CHANGED
|
@@ -456,9 +456,14 @@ async watchForReprepare({ verbose }) {
|
|
|
456
456
|
|
|
457
457
|
async watchCustomComponentsForCopy({ verbose }) {
|
|
458
458
|
const customComponentsDir = this.adminforth.config.customization.customComponentsDir;
|
|
459
|
-
|
|
459
|
+
// check dir exists
|
|
460
|
+
try {
|
|
461
|
+
await fs.promises.access(customComponentsDir, fs.constants.F_OK);
|
|
462
|
+
} catch (e) {
|
|
463
|
+
console.log(`Custom components dir "${customComponentsDir}" does not exist, feel free to create it place custom assets and Vue files there`);
|
|
460
464
|
return;
|
|
461
465
|
}
|
|
466
|
+
|
|
462
467
|
// check if folder exists
|
|
463
468
|
try {
|
|
464
469
|
await fs.promises.access(customComponentsDir, fs.constants.F_OK);
|
|
@@ -482,9 +487,7 @@ async watchForReprepare({ verbose }) {
|
|
|
482
487
|
}
|
|
483
488
|
};
|
|
484
489
|
|
|
485
|
-
|
|
486
|
-
await collectDirectories(customComponentsDir);
|
|
487
|
-
}
|
|
490
|
+
await collectDirectories(customComponentsDir);
|
|
488
491
|
|
|
489
492
|
const watcher = filewatcher();
|
|
490
493
|
directories.forEach((dir) => {
|