@varlet/cli 3.20.10 → 3.20.11
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parse, resolve } from 'path';
|
|
2
2
|
import fse from 'fs-extra';
|
|
3
|
-
import
|
|
3
|
+
import { globSync } from 'glob';
|
|
4
4
|
import less from 'less';
|
|
5
5
|
import * as sass from 'sass';
|
|
6
6
|
import { CWD } from '../shared/constant.js';
|
|
@@ -48,8 +48,8 @@ export function compileScss(file) {
|
|
|
48
48
|
writeFileSync(replaceExt(file, '.css'), compressCss(css), 'utf-8');
|
|
49
49
|
}
|
|
50
50
|
export function clearLessFiles(dir) {
|
|
51
|
-
|
|
51
|
+
globSync(`${dir}/**/*.less`, { windowsPathsNoEscape: true }).forEach(unlinkSync);
|
|
52
52
|
}
|
|
53
53
|
export function clearScssFiles(dir) {
|
|
54
|
-
|
|
54
|
+
globSync(`${dir}/**/*.scss`, { windowsPathsNoEscape: true }).forEach(unlinkSync);
|
|
55
55
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { extname, resolve } from 'path';
|
|
2
2
|
import { fileURLToPath } from 'url';
|
|
3
|
+
import { slash } from '@varlet/shared';
|
|
3
4
|
import fse from 'fs-extra';
|
|
4
|
-
import
|
|
5
|
+
import { glob as globFiles } from 'glob';
|
|
5
6
|
import { CLI_PACKAGE_JSON, PUBLIC_DIR_INDEXES, SCRIPTS_EXTENSIONS, SRC_DIR, UI_PACKAGE_JSON } from './constant.js';
|
|
6
7
|
const { appendFileSync, ensureFileSync, lstatSync, outputFileSync, pathExistsSync, readdir, readFileSync, readJSONSync, } = fse;
|
|
7
8
|
export async function getPublicDirs() {
|
|
@@ -34,17 +35,10 @@ export function outputFileSyncOnChange(path, code) {
|
|
|
34
35
|
outputFileSync(path, code);
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
reject(err);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
resolve(files);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
});
|
|
38
|
+
// match glob@7 results: `\` is a path separator on Windows, output is `/` separated and sorted
|
|
39
|
+
export async function glob(pattern) {
|
|
40
|
+
const files = await globFiles(pattern, { windowsPathsNoEscape: true });
|
|
41
|
+
return files.map(slash).sort((a, b) => a.localeCompare(b, 'en'));
|
|
48
42
|
}
|
|
49
43
|
export function getDirname(url) {
|
|
50
44
|
return fileURLToPath(new URL('.', url));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/cli",
|
|
3
|
-
"version": "3.20.
|
|
3
|
+
"version": "3.20.11",
|
|
4
4
|
"description": "cli of varlet",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"ejs": "^3.1.8",
|
|
45
45
|
"esbuild": "0.28.1",
|
|
46
46
|
"fs-extra": "^9.0.1",
|
|
47
|
-
"glob": "^
|
|
47
|
+
"glob": "^14.0.4",
|
|
48
48
|
"hash-sum": "^2.0.0",
|
|
49
49
|
"less": "^4.0.0",
|
|
50
50
|
"markdown-it": "^12.2.3",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"typescript": "5.6.3",
|
|
57
57
|
"vite-plus": "1.1.0",
|
|
58
58
|
"vue": "3.5.21",
|
|
59
|
-
"@varlet/shared": "3.20.
|
|
60
|
-
"@varlet/vite-plugins": "3.20.
|
|
59
|
+
"@varlet/shared": "3.20.11",
|
|
60
|
+
"@varlet/vite-plugins": "3.20.11"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/babel__core": "^7.20.1",
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"@types/node": "^22.18.0",
|
|
70
70
|
"@types/sharp": "0.31.1",
|
|
71
71
|
"rimraf": "^5.0.1",
|
|
72
|
-
"@varlet/
|
|
73
|
-
"@varlet/
|
|
74
|
-
"@varlet/ui": "3.20.
|
|
72
|
+
"@varlet/icons": "3.20.11",
|
|
73
|
+
"@varlet/touch-emulator": "3.20.11",
|
|
74
|
+
"@varlet/ui": "3.20.11"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@vitest/coverage-istanbul": "5.0.3",
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
"live-server": "^1.2.1",
|
|
83
83
|
"vue": "3.5.21",
|
|
84
84
|
"vue-router": "4.5.1",
|
|
85
|
-
"@varlet/icons": "3.20.
|
|
86
|
-
"@varlet/touch-emulator": "3.20.
|
|
87
|
-
"@varlet/ui": "3.20.
|
|
85
|
+
"@varlet/icons": "3.20.11",
|
|
86
|
+
"@varlet/touch-emulator": "3.20.11",
|
|
87
|
+
"@varlet/ui": "3.20.11"
|
|
88
88
|
},
|
|
89
89
|
"engines": {
|
|
90
90
|
"node": "^22.18.0 || ^24.11.0 || >=26.0.0"
|