@varlet/cli 2.11.7 → 2.11.9-alpha.1687881786307

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.
@@ -4,6 +4,7 @@ import glob from 'glob';
4
4
  import { replaceExt, smartAppendFileSync } from '../shared/fsUtils.js';
5
5
  import { parse, resolve } from 'path';
6
6
  import { getScriptExtname } from './compileScript.js';
7
+ import { CWD } from '../shared/constant.js';
7
8
  const { render } = less;
8
9
  const { readFileSync, writeFileSync, unlinkSync } = fse;
9
10
  export const EMPTY_SPACE_RE = /[\s]+/g;
@@ -32,7 +33,10 @@ export function extractStyleDependencies(file, code, styleReg) {
32
33
  }
33
34
  export async function compileLess(file) {
34
35
  const source = readFileSync(file, 'utf-8');
35
- const { css } = await render(source, { filename: file });
36
+ const { css } = await render(source, {
37
+ filename: file,
38
+ paths: [resolve(CWD, 'node_modules')],
39
+ });
36
40
  writeFileSync(replaceExt(file, '.css'), clearEmptyLine(css), 'utf-8');
37
41
  }
38
42
  export function clearLessFiles(dir) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/cli",
3
- "version": "2.11.7",
3
+ "version": "2.11.9-alpha.1687881786307",
4
4
  "type": "module",
5
5
  "description": "cli of varlet",
6
6
  "bin": {
@@ -70,8 +70,8 @@
70
70
  "vite": "4.3.5",
71
71
  "vue": "3.3.2",
72
72
  "webfont": "^9.0.0",
73
- "@varlet/shared": "2.11.7",
74
- "@varlet/vite-plugins": "2.11.7"
73
+ "@varlet/vite-plugins": "2.11.9-alpha.1687881786307",
74
+ "@varlet/shared": "2.11.9-alpha.1687881786307"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@types/babel__core": "^7.1.12",
@@ -85,8 +85,8 @@
85
85
  "@types/node": "^18.7.20",
86
86
  "@types/semver": "^7.3.9",
87
87
  "@types/sharp": "0.31.1",
88
- "@varlet/icons": "2.11.7",
89
- "@varlet/touch-emulator": "2.11.7"
88
+ "@varlet/touch-emulator": "2.11.9-alpha.1687881786307",
89
+ "@varlet/icons": "2.11.9-alpha.1687881786307"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "@vue/runtime-core": "3.2.47",
@@ -96,8 +96,8 @@
96
96
  "lodash-es": "^4.17.21",
97
97
  "vue": "3.3.1",
98
98
  "vue-router": "4.2.0",
99
- "@varlet/icons": "2.11.7",
100
- "@varlet/touch-emulator": "2.11.7"
99
+ "@varlet/touch-emulator": "2.11.9-alpha.1687881786307",
100
+ "@varlet/icons": "2.11.9-alpha.1687881786307"
101
101
  },
102
102
  "scripts": {
103
103
  "dev": "tsc --watch",
@@ -142,7 +142,7 @@ watch(
142
142
  <style>
143
143
  .varlet-site-playground-container {
144
144
  width: calc(100vw - 256px);
145
- max-width: 1360px;
145
+ max-width: 1660px;
146
146
  height: 100vh;
147
147
  }
148
148