@windwalker-io/core 4.1.9 → 4.1.10

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windwalker-io/core",
3
- "version": "4.1.9",
3
+ "version": "4.1.10",
4
4
  "type": "module",
5
5
  "description": "Windwalker Core JS package",
6
6
  "scripts": {
@@ -72,20 +72,23 @@ export async function installVendors(npmVendors = [], legacyComposerVendors = []
72
72
 
73
73
  // Install local saved vendors
74
74
  const staticVendorDir = 'resources/assets/vendor/';
75
- const staticVendors = fs.readdirSync(staticVendorDir);
76
75
 
77
- for (const staticVendor of staticVendors) {
78
- if (staticVendor.startsWith('@')) {
79
- const subVendors = fs.readdirSync(staticVendorDir + staticVendor);
80
-
81
- for (const subVendor of subVendors) {
82
- const subVendorName = staticVendor + '/' + subVendor;
83
- console.log(`[${action} Local] resources/assets/vendor/${subVendorName}/ => ${root}/${subVendorName}/`);
84
- doInstall(staticVendorDir + subVendorName + '/', `${root}/${subVendorName}/`);
76
+ if (fs.existsSync(staticVendorDir)) {
77
+ const staticVendors = fs.readdirSync(staticVendorDir);
78
+
79
+ for (const staticVendor of staticVendors) {
80
+ if (staticVendor.startsWith('@')) {
81
+ const subVendors = fs.readdirSync(staticVendorDir + staticVendor);
82
+
83
+ for (const subVendor of subVendors) {
84
+ const subVendorName = staticVendor + '/' + subVendor;
85
+ console.log(`[${action} Local] resources/assets/vendor/${subVendorName}/ => ${root}/${subVendorName}/`);
86
+ doInstall(staticVendorDir + subVendorName + '/', `${root}/${subVendorName}/`);
87
+ }
88
+ } else {
89
+ console.log(`[${action} Local] resources/assets/vendor/${staticVendor}/ => ${root}/${staticVendor}/`);
90
+ doInstall(staticVendorDir + staticVendor, `${root}/${staticVendor}/`);
85
91
  }
86
- } else {
87
- console.log(`[${action} Local] resources/assets/vendor/${staticVendor}/ => ${root}/${staticVendor}/`);
88
- doInstall(staticVendorDir + staticVendor, `${root}/${staticVendor}/`);
89
92
  }
90
93
  }
91
94
  }