@windwalker-io/core 4.0.4 → 4.0.5
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/.gulp.json +7 -7
- package/LICENSE +19 -19
- package/dist/debugger/1.js +1 -1
- package/dist/debugger/1.js.map +1 -1
- package/dist/debugger/2.js +2 -2
- package/dist/debugger/2.js.map +1 -1
- package/dist/debugger/3.js +1 -1
- package/dist/debugger/3.js.map +1 -1
- package/dist/debugger/4.js +1 -1
- package/dist/debugger/4.js.map +1 -1
- package/dist/debugger/5.js +1 -1
- package/dist/debugger/5.js.map +1 -1
- package/dist/debugger/debugger.js +6 -6
- package/dist/debugger/debugger.js.map +1 -1
- package/package.json +1 -1
- package/src/index.mjs +9 -9
- package/src/install-vendors.mjs +12 -4
package/package.json
CHANGED
package/src/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Part of funclass project.
|
|
3
|
-
*
|
|
4
|
-
* @copyright Copyright (C) 2021 LYRASOFT.
|
|
5
|
-
* @license __LICENSE__
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export * from './asset-sync.mjs';
|
|
9
|
-
export * from './install-vendors.mjs';
|
|
1
|
+
/**
|
|
2
|
+
* Part of funclass project.
|
|
3
|
+
*
|
|
4
|
+
* @copyright Copyright (C) 2021 LYRASOFT.
|
|
5
|
+
* @license __LICENSE__
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export * from './asset-sync.mjs';
|
|
9
|
+
export * from './install-vendors.mjs';
|
package/src/install-vendors.mjs
CHANGED
|
@@ -11,8 +11,9 @@ import { loadJson } from './utils.mjs';
|
|
|
11
11
|
import path from 'path';
|
|
12
12
|
import fs from 'fs';
|
|
13
13
|
|
|
14
|
-
export async function installVendors(
|
|
15
|
-
const root =
|
|
14
|
+
export async function installVendors(npmVendors, composerVendors = [], to = 'www/assets/vendor') {
|
|
15
|
+
const root = to;
|
|
16
|
+
let vendors = npmVendors;
|
|
16
17
|
|
|
17
18
|
if (!fs.existsSync(root)) {
|
|
18
19
|
fs.mkdirSync(root);
|
|
@@ -33,12 +34,19 @@ export async function installVendors(vendors) {
|
|
|
33
34
|
|
|
34
35
|
vendors.forEach((vendor) => {
|
|
35
36
|
if (fs.existsSync(`node_modules/${vendor}/`)) {
|
|
36
|
-
console.log(`[Link] node_modules/${vendor}/ => www/assets/vendor/${vendor}/`);
|
|
37
|
+
console.log(`[Link NPM] node_modules/${vendor}/ => www/assets/vendor/${vendor}/`);
|
|
37
38
|
src(`node_modules/${vendor}/`).pipe(symlink(`www/assets/vendor/${vendor}`));
|
|
38
39
|
}
|
|
39
40
|
});
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
composerVendors.forEach((vendor) => {
|
|
43
|
+
if (fs.existsSync(`vendor/${vendor}/assets`)) {
|
|
44
|
+
console.log(`[Link Composer] vendor/${vendor}/assets => www/assets/vendor/${vendor}/`);
|
|
45
|
+
src(`vendor/${vendor}/assets/`).pipe(symlink(`www/assets/vendor/${vendor}/`));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
console.log('[Link Local] resources/assets/vendor/**/* => www/assets/vendor/');
|
|
42
50
|
src('resources/assets/vendor/*').pipe(symlink('www/assets/vendor/'));
|
|
43
51
|
}
|
|
44
52
|
|