@varlet/cli 1.27.20 → 2.0.0-alpha.1663742071515
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/LICENCE +1 -1
- package/lib/commands/commitLint.js +1 -1
- package/lib/commands/compile.d.ts +5 -3
- package/lib/commands/compile.js +2 -2
- package/lib/commands/create.d.ts +8 -3
- package/lib/commands/create.js +100 -51
- package/lib/commands/dev.d.ts +4 -2
- package/lib/commands/dev.js +3 -3
- package/lib/commands/gen.d.ts +8 -1
- package/lib/commands/gen.js +61 -33
- package/lib/commands/jest.js +11 -7
- package/lib/commands/release.d.ts +4 -2
- package/lib/commands/release.js +2 -2
- package/lib/commands/test.d.ts +7 -0
- package/lib/commands/test.js +26 -0
- package/lib/commands/useVite.d.ts +1 -0
- package/lib/commands/useVite.js +70 -0
- package/lib/commands/vite.d.ts +3 -0
- package/lib/commands/vite.js +69 -0
- package/lib/compiler/compileModule.js +9 -5
- package/lib/compiler/compileSFC.js +14 -11
- package/lib/compiler/compileScript.js +4 -12
- package/lib/compiler/compileStyle.d.ts +1 -1
- package/lib/compiler/compileStyle.js +7 -17
- package/lib/compiler/compileTypes.js +4 -7
- package/lib/config/jest.config.js +1 -0
- package/lib/config/vite.config.js +1 -1
- package/lib/config/vitest.config.d.ts +2 -0
- package/lib/config/vitest.config.js +28 -0
- package/lib/index.js +22 -3
- package/lib/shared/constant.js +1 -1
- package/lib/shared/logger.d.ts +1 -0
- package/lib/shared/logger.js +3 -0
- package/package.json +16 -12
- package/site/components/button/Button.vue +45 -23
- package/site/components/button/button.less +6 -6
- package/site/components/button/props.ts +10 -2
- package/site/components/cell/Cell.vue +24 -12
- package/site/components/cell/cell.less +11 -7
- package/site/components/cell/props.ts +2 -2
- package/site/components/code-example/CodeExample.vue +17 -23
- package/site/components/context/index.ts +4 -0
- package/site/components/context/lock.ts +30 -41
- package/site/components/icon/Icon.vue +16 -9
- package/site/components/loading/Loading.vue +54 -25
- package/site/components/loading/loading.less +120 -35
- package/site/components/loading/props.ts +7 -2
- package/site/components/popup/Popup.tsx +102 -0
- package/site/components/popup/index.ts +10 -0
- package/site/components/popup/popup.less +125 -0
- package/site/components/popup/props.ts +63 -0
- package/site/components/progress/Progress.vue +28 -24
- package/site/components/progress/progress.less +16 -13
- package/site/components/progress/props.ts +1 -1
- package/site/components/ripple/index.ts +28 -7
- package/site/components/ripple/ripple.less +3 -0
- package/site/components/snackbar/Snackbar.vue +10 -7
- package/site/components/snackbar/core.vue +37 -22
- package/site/components/snackbar/index.tsx +14 -14
- package/site/components/snackbar/props.ts +10 -7
- package/site/components/utils/components.ts +49 -1
- package/site/components/utils/elements.ts +17 -0
- package/site/mobile/App.vue +42 -42
- package/site/mobile/components/AppHome.vue +1 -1
- package/site/mobile/components/app-bar/AppBar.vue +17 -21
- package/site/mobile/components/app-bar/appBar.less +2 -1
- package/site/mobile/main.ts +6 -2
- package/site/pc/Layout.vue +93 -67
- package/site/pc/components/AnimationBox.vue +3 -15
- package/site/pc/components/AppHeader.vue +110 -97
- package/site/pc/components/AppMobile.vue +8 -2
- package/site/pc/components/AppSidebar.vue +19 -10
- package/site/pc/components/LogoAnimation.vue +29 -31
- package/site/pc/floating.ts +3 -3
- package/site/pc/main.ts +6 -0
- package/site/pc/pages/index/index.less +142 -197
- package/site/pc/pages/index/index.vue +65 -80
- package/site/pc/pages/index/locale/en-US.ts +1 -5
- package/site/pc/pages/index/locale/zh-CN.ts +1 -5
- package/site/useProgress.ts +14 -17
- package/site/utils.ts +32 -20
- package/template/create/__tests__/index.spec.ejs +8 -0
- package/template/create/docs/en-US.md +0 -0
- package/template/create/docs/zh-CN.md +0 -0
- package/template/create/example/index.ejs +15 -0
- package/template/create/example/locale/en-US.ts +3 -0
- package/{generators/config/i18n/sfc/src/button → template/create}/example/locale/index.ts +0 -0
- package/template/create/example/locale/zh-CN.ts +3 -0
- package/template/create/index.ejs +12 -0
- package/template/create/less.ejs +3 -0
- package/template/create/props.ts +1 -0
- package/template/create/tsx.ejs +13 -0
- package/template/create/vue.ejs +17 -0
- package/{generators → template/generators}/base/.prettierignore +0 -0
- package/{generators → template/generators}/base/.prettierrc +0 -0
- package/{generators → template/generators}/base/README.md +0 -0
- package/{generators → template/generators}/base/babel.config.js +0 -0
- package/{generators → template/generators}/base/public/highlight.css +0 -0
- package/{generators → template/generators}/base/public/logo.svg +0 -0
- package/{generators → template/generators}/base/shims/shims-md.d.ts +0 -0
- package/{generators → template/generators}/base/shims/shims-vue.d.ts +0 -0
- package/{generators → template/generators}/base/tsconfig.json +0 -0
- package/{generators → template/generators}/config/default/base/docs/home.zh-CN.md +0 -0
- package/{generators → template/generators}/config/default/base/package.json +1 -1
- package/{generators → template/generators}/config/default/base/types/basicComponent.d.ts +0 -0
- package/{generators → template/generators}/config/default/base/types/button.d.ts +0 -0
- package/{generators → template/generators}/config/default/base/types/index.d.ts +0 -0
- package/{generators → template/generators}/config/default/base/varlet.config.js +1 -1
- package/{generators → template/generators}/config/default/sfc/src/button/Button.vue +6 -6
- package/{generators → template/generators}/config/default/sfc/src/button/__tests__/index.spec.js +0 -0
- package/{generators/config/default/tsx → template/generators/config/default/sfc}/src/button/button.less +1 -1
- package/{generators → template/generators}/config/default/sfc/src/button/docs/zh-CN.md +0 -0
- package/{generators → template/generators}/config/default/sfc/src/button/example/BasicUse.vue +0 -0
- package/{generators → template/generators}/config/default/sfc/src/button/example/ModifyColor.vue +0 -0
- package/{generators → template/generators}/config/default/sfc/src/button/example/index.vue +2 -2
- package/{generators → template/generators}/config/default/sfc/src/button/index.ts +0 -0
- package/{generators → template/generators}/config/default/tsx/src/button/Button.tsx +11 -13
- package/{generators → template/generators}/config/default/tsx/src/button/__tests__/index.spec.js +0 -0
- package/{generators/config/i18n → template/generators/config/default}/tsx/src/button/button.less +1 -1
- package/{generators → template/generators}/config/default/tsx/src/button/docs/zh-CN.md +0 -0
- package/{generators → template/generators}/config/default/tsx/src/button/example/BasicUse.vue +0 -0
- package/{generators → template/generators}/config/default/tsx/src/button/example/ModifyColor.vue +0 -0
- package/{generators → template/generators}/config/default/tsx/src/button/example/index.vue +2 -2
- package/{generators → template/generators}/config/default/tsx/src/button/index.ts +0 -0
- package/{generators → template/generators}/config/i18n/base/docs/home.en-US.md +0 -0
- package/{generators → template/generators}/config/i18n/base/docs/home.zh-CN.md +0 -0
- package/{generators → template/generators}/config/i18n/base/package.json +1 -1
- package/{generators → template/generators}/config/i18n/base/types/basicComponent.d.ts +0 -0
- package/{generators → template/generators}/config/i18n/base/types/button.d.ts +0 -0
- package/{generators → template/generators}/config/i18n/base/types/index.d.ts +0 -0
- package/{generators → template/generators}/config/i18n/base/types/locale.d.ts +0 -0
- package/{generators → template/generators}/config/i18n/base/varlet.config.js +3 -3
- package/{generators → template/generators}/config/i18n/sfc/src/button/Button.vue +7 -7
- package/{generators → template/generators}/config/i18n/sfc/src/button/__tests__/index.spec.js +0 -0
- package/{generators → template/generators}/config/i18n/sfc/src/button/button.less +1 -1
- package/{generators → template/generators}/config/i18n/sfc/src/button/docs/en-US.md +0 -0
- package/{generators → template/generators}/config/i18n/sfc/src/button/docs/zh-CN.md +0 -0
- package/{generators → template/generators}/config/i18n/sfc/src/button/example/BasicUse.vue +0 -0
- package/{generators → template/generators}/config/i18n/sfc/src/button/example/ModifyColor.vue +0 -0
- package/{generators → template/generators}/config/i18n/sfc/src/button/example/index.vue +1 -1
- package/{generators/config/i18n/tsx → template/generators/config/i18n/sfc}/src/button/example/locale/en-US.ts +1 -1
- package/{generators/config/i18n/tsx → template/generators/config/i18n/sfc}/src/button/example/locale/index.ts +0 -0
- package/{generators/config/i18n/tsx → template/generators/config/i18n/sfc}/src/button/example/locale/zh-CN.ts +1 -1
- package/{generators → template/generators}/config/i18n/sfc/src/button/index.ts +0 -0
- package/{generators → template/generators}/config/i18n/sfc/src/locale/__tests__/index.spec.js +0 -0
- package/{generators → template/generators}/config/i18n/sfc/src/locale/docs/en-US.md +0 -0
- package/{generators → template/generators}/config/i18n/sfc/src/locale/docs/zh-CN.md +0 -0
- package/{generators → template/generators}/config/i18n/sfc/src/locale/en-US.d.ts +0 -0
- package/{generators/config/i18n/tsx → template/generators/config/i18n/sfc}/src/locale/en-US.ts +1 -1
- package/{generators → template/generators}/config/i18n/sfc/src/locale/index.ts +0 -0
- package/{generators → template/generators}/config/i18n/sfc/src/locale/zh-CN.d.ts +0 -0
- package/{generators/config/i18n/tsx → template/generators/config/i18n/sfc}/src/locale/zh-CN.ts +1 -1
- package/{generators → template/generators}/config/i18n/tsx/src/button/Button.tsx +12 -14
- package/{generators → template/generators}/config/i18n/tsx/src/button/__tests__/index.spec.js +0 -0
- package/{generators/config/default/sfc → template/generators/config/i18n/tsx}/src/button/button.less +1 -1
- package/{generators → template/generators}/config/i18n/tsx/src/button/docs/en-US.md +0 -0
- package/{generators → template/generators}/config/i18n/tsx/src/button/docs/zh-CN.md +0 -0
- package/{generators → template/generators}/config/i18n/tsx/src/button/example/BasicUse.vue +0 -0
- package/{generators → template/generators}/config/i18n/tsx/src/button/example/ModifyColor.vue +0 -0
- package/{generators → template/generators}/config/i18n/tsx/src/button/example/index.vue +1 -1
- package/{generators/config/i18n/sfc → template/generators/config/i18n/tsx}/src/button/example/locale/en-US.ts +1 -1
- package/template/generators/config/i18n/tsx/src/button/example/locale/index.ts +23 -0
- package/{generators/config/i18n/sfc → template/generators/config/i18n/tsx}/src/button/example/locale/zh-CN.ts +1 -1
- package/{generators → template/generators}/config/i18n/tsx/src/button/index.ts +0 -0
- package/{generators → template/generators}/config/i18n/tsx/src/locale/__tests__/index.spec.js +0 -0
- package/{generators → template/generators}/config/i18n/tsx/src/locale/docs/en-US.md +0 -0
- package/{generators → template/generators}/config/i18n/tsx/src/locale/docs/zh-CN.md +0 -0
- package/{generators → template/generators}/config/i18n/tsx/src/locale/en-US.d.ts +0 -0
- package/{generators/config/i18n/sfc → template/generators/config/i18n/tsx}/src/locale/en-US.ts +1 -1
- package/{generators → template/generators}/config/i18n/tsx/src/locale/index.ts +0 -0
- package/{generators → template/generators}/config/i18n/tsx/src/locale/zh-CN.d.ts +0 -0
- package/{generators/config/i18n/sfc → template/generators/config/i18n/tsx}/src/locale/zh-CN.ts +1 -1
- package/varlet.default.config.js +137 -15
- package/site/mobile/components/styles/common.less +0 -64
- package/site/mobile/components/styles/elevation.less +0 -126
- package/site/mobile/components/styles/var.less +0 -27
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.vite = void 0;
|
|
43
|
+
var plugin_vue_1 = __importDefault(require("@vitejs/plugin-vue"));
|
|
44
|
+
var plugin_vue_jsx_1 = __importDefault(require("@vitejs/plugin-vue-jsx"));
|
|
45
|
+
var vite_1 = require("vite");
|
|
46
|
+
function vite(mode) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
+
var run, result;
|
|
49
|
+
return __generator(this, function (_a) {
|
|
50
|
+
switch (_a.label) {
|
|
51
|
+
case 0:
|
|
52
|
+
run = mode === 'build' ? vite_1.build : vite_1.createServer;
|
|
53
|
+
return [4 /*yield*/, run({
|
|
54
|
+
plugins: [(0, plugin_vue_1.default)(), (0, plugin_vue_jsx_1.default)()],
|
|
55
|
+
})];
|
|
56
|
+
case 1:
|
|
57
|
+
result = _a.sent();
|
|
58
|
+
if (!(mode === 'dev')) return [3 /*break*/, 3];
|
|
59
|
+
return [4 /*yield*/, result.listen()];
|
|
60
|
+
case 2:
|
|
61
|
+
_a.sent();
|
|
62
|
+
result.printUrls();
|
|
63
|
+
_a.label = 3;
|
|
64
|
+
case 3: return [2 /*return*/];
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
exports.vite = vite;
|
|
@@ -163,10 +163,7 @@ function compileModule(modules) {
|
|
|
163
163
|
moduleDir = _a.sent();
|
|
164
164
|
return [4 /*yield*/, Promise.all(moduleDir.map(function (filename) {
|
|
165
165
|
var file = (0, path_1.resolve)(dest, filename);
|
|
166
|
-
|
|
167
|
-
(0, fs_extra_1.ensureFileSync)((0, path_1.resolve)(file, './style/index.js'));
|
|
168
|
-
(0, fs_extra_1.ensureFileSync)((0, path_1.resolve)(file, './style/less.js'));
|
|
169
|
-
}
|
|
166
|
+
(0, fsUtils_1.isDir)(file) && (0, fs_extra_1.ensureFileSync)((0, path_1.resolve)(file, './style/index.js'));
|
|
170
167
|
return (0, fsUtils_1.isDir)(file) ? compileDir(file) : null;
|
|
171
168
|
}))];
|
|
172
169
|
case 7:
|
|
@@ -174,9 +171,16 @@ function compileModule(modules) {
|
|
|
174
171
|
return [4 /*yield*/, (0, fsUtils_1.getPublicDirs)()];
|
|
175
172
|
case 8:
|
|
176
173
|
publicDirs = _a.sent();
|
|
177
|
-
|
|
174
|
+
if (!(modules === 'commonjs')) return [3 /*break*/, 10];
|
|
175
|
+
return [4 /*yield*/, (0, compileScript_1.compileCommonJSEntry)(dest, publicDirs)];
|
|
178
176
|
case 9:
|
|
179
177
|
_a.sent();
|
|
178
|
+
return [3 /*break*/, 12];
|
|
179
|
+
case 10: return [4 /*yield*/, (0, compileScript_1.compileESEntry)(dest, publicDirs)];
|
|
180
|
+
case 11:
|
|
181
|
+
_a.sent();
|
|
182
|
+
_a.label = 12;
|
|
183
|
+
case 12:
|
|
180
184
|
(0, compileTypes_1.generateReference)(dest);
|
|
181
185
|
return [2 /*return*/];
|
|
182
186
|
}
|
|
@@ -41,6 +41,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
42
|
exports.compileSFC = exports.injectRender = void 0;
|
|
43
43
|
var hash_sum_1 = __importDefault(require("hash-sum"));
|
|
44
|
+
var path_1 = require("path");
|
|
44
45
|
var fs_extra_1 = require("fs-extra");
|
|
45
46
|
var compiler_sfc_1 = require("@vue/compiler-sfc");
|
|
46
47
|
var fsUtils_1 = require("../shared/fsUtils");
|
|
@@ -61,7 +62,7 @@ function injectRender(script, render) {
|
|
|
61
62
|
exports.injectRender = injectRender;
|
|
62
63
|
function compileSFC(sfc) {
|
|
63
64
|
return __awaiter(this, void 0, void 0, function () {
|
|
64
|
-
var sources, descriptor, script, scriptSetup, template, styles, hasScope, id, scopeId, render, content, code, index, style, file,
|
|
65
|
+
var sources, descriptor, script, scriptSetup, template, styles, hasScope, id, scopeId, render, content, code, index, style, file, _a, base, dir, dependencyPath, cssFile, code;
|
|
65
66
|
return __generator(this, function (_b) {
|
|
66
67
|
switch (_b.label) {
|
|
67
68
|
case 0: return [4 /*yield*/, (0, fs_extra_1.readFile)(sfc, 'utf-8')];
|
|
@@ -76,7 +77,7 @@ function compileSFC(sfc) {
|
|
|
76
77
|
hasScope = styles.some(function (style) { return style.scoped; });
|
|
77
78
|
id = (0, hash_sum_1.default)(sources);
|
|
78
79
|
scopeId = hasScope ? "data-v-".concat(id) : '';
|
|
79
|
-
if (!script) return [3 /*break*/,
|
|
80
|
+
if (!script) return [3 /*break*/, 6];
|
|
80
81
|
render = template &&
|
|
81
82
|
(0, compiler_sfc_1.compileTemplate)({
|
|
82
83
|
id: id,
|
|
@@ -101,30 +102,32 @@ function compileSFC(sfc) {
|
|
|
101
102
|
index = 0;
|
|
102
103
|
_b.label = 3;
|
|
103
104
|
case 3:
|
|
104
|
-
if (!(index < styles.length)) return [3 /*break*/,
|
|
105
|
+
if (!(index < styles.length)) return [3 /*break*/, 6];
|
|
105
106
|
style = styles[index];
|
|
106
107
|
file = (0, fsUtils_1.replaceExt)(sfc, "Sfc".concat(index || '', ".").concat(style.lang || 'css'));
|
|
108
|
+
_a = (0, path_1.parse)(file), base = _a.base, dir = _a.dir;
|
|
109
|
+
dependencyPath = (0, compileStyle_1.normalizeStyleDependency)(base, compileStyle_1.STYLE_IMPORT_RE);
|
|
110
|
+
cssFile = (0, path_1.resolve)(dir, './style/index.js');
|
|
107
111
|
code = (0, compiler_sfc_1.compileStyle)({
|
|
108
112
|
source: style.content,
|
|
109
113
|
filename: file,
|
|
110
114
|
id: scopeId,
|
|
111
115
|
scoped: style.scoped,
|
|
112
116
|
}).code;
|
|
113
|
-
code = (0, compileStyle_1.extractStyleDependencies)(file, code, compileStyle_1.STYLE_IMPORT_RE
|
|
117
|
+
code = (0, compileStyle_1.extractStyleDependencies)(file, code, compileStyle_1.STYLE_IMPORT_RE);
|
|
114
118
|
(0, fs_extra_1.writeFileSync)(file, (0, compileStyle_1.clearEmptyLine)(code), 'utf-8');
|
|
115
|
-
|
|
116
|
-
|
|
119
|
+
(0, fsUtils_1.smartAppendFileSync)(cssFile, process.env.BABEL_MODULE === 'commonjs'
|
|
120
|
+
? "require('".concat(dependencyPath, ".css')\n")
|
|
121
|
+
: "import '".concat(dependencyPath, ".css'\n"));
|
|
122
|
+
if (!(style.lang === 'less')) return [3 /*break*/, 5];
|
|
117
123
|
return [4 /*yield*/, (0, compileStyle_1.compileLess)(file)];
|
|
118
124
|
case 4:
|
|
119
|
-
|
|
125
|
+
_b.sent();
|
|
120
126
|
_b.label = 5;
|
|
121
127
|
case 5:
|
|
122
|
-
_a;
|
|
123
|
-
_b.label = 6;
|
|
124
|
-
case 6:
|
|
125
128
|
index++;
|
|
126
129
|
return [3 /*break*/, 3];
|
|
127
|
-
case
|
|
130
|
+
case 6: return [2 /*return*/];
|
|
128
131
|
}
|
|
129
132
|
});
|
|
130
133
|
});
|
|
@@ -94,8 +94,8 @@ function compileScript(script, file) {
|
|
|
94
94
|
})];
|
|
95
95
|
case 1:
|
|
96
96
|
code = (_a.sent()).code;
|
|
97
|
-
code = (0, compileStyle_1.extractStyleDependencies)(file, code, modules === 'commonjs' ? compileStyle_1.REQUIRE_CSS_RE : compileStyle_1.IMPORT_CSS_RE
|
|
98
|
-
code = (0, compileStyle_1.extractStyleDependencies)(file, code, modules === 'commonjs' ? compileStyle_1.REQUIRE_LESS_RE : compileStyle_1.IMPORT_LESS_RE
|
|
97
|
+
code = (0, compileStyle_1.extractStyleDependencies)(file, code, modules === 'commonjs' ? compileStyle_1.REQUIRE_CSS_RE : compileStyle_1.IMPORT_CSS_RE);
|
|
98
|
+
code = (0, compileStyle_1.extractStyleDependencies)(file, code, modules === 'commonjs' ? compileStyle_1.REQUIRE_LESS_RE : compileStyle_1.IMPORT_LESS_RE);
|
|
99
99
|
code = (0, exports.replaceVueExt)(code);
|
|
100
100
|
code = (0, exports.replaceTSXExt)(code);
|
|
101
101
|
code = (0, exports.replaceJSXExt)(code);
|
|
@@ -126,7 +126,7 @@ function compileScriptFile(file) {
|
|
|
126
126
|
exports.compileScriptFile = compileScriptFile;
|
|
127
127
|
function compileESEntry(dir, publicDirs) {
|
|
128
128
|
return __awaiter(this, void 0, void 0, function () {
|
|
129
|
-
var imports, plugins, constInternalComponents, cssImports,
|
|
129
|
+
var imports, plugins, constInternalComponents, cssImports, publicComponents, install, indexTemplate, styleTemplate, umdTemplate;
|
|
130
130
|
return __generator(this, function (_a) {
|
|
131
131
|
switch (_a.label) {
|
|
132
132
|
case 0:
|
|
@@ -134,7 +134,6 @@ function compileESEntry(dir, publicDirs) {
|
|
|
134
134
|
plugins = [];
|
|
135
135
|
constInternalComponents = [];
|
|
136
136
|
cssImports = [];
|
|
137
|
-
lessImports = [];
|
|
138
137
|
publicComponents = [];
|
|
139
138
|
publicDirs.forEach(function (dirname) {
|
|
140
139
|
var publicComponent = (0, shared_1.bigCamelize)(dirname);
|
|
@@ -143,18 +142,15 @@ function compileESEntry(dir, publicDirs) {
|
|
|
143
142
|
constInternalComponents.push("export const _".concat(publicComponent, "Component = ").concat(publicComponent, "Module._").concat(publicComponent, "Component || {}"));
|
|
144
143
|
plugins.push("".concat(publicComponent, ".install && app.use(").concat(publicComponent, ")"));
|
|
145
144
|
cssImports.push("import './".concat(dirname, "/style'"));
|
|
146
|
-
lessImports.push("import './".concat(dirname, "/style/less'"));
|
|
147
145
|
});
|
|
148
146
|
install = "\nfunction install(app) {\n ".concat(plugins.join('\n '), "\n}\n");
|
|
149
147
|
indexTemplate = "".concat(imports.join('\n'), "\n\n").concat(constInternalComponents.join('\n'), "\n\n").concat(install, "\nexport {\n install,\n ").concat(publicComponents.join(',\n '), "\n}\n\nexport default {\n install,\n ").concat(publicComponents.join(',\n '), "\n}\n");
|
|
150
148
|
styleTemplate = "".concat(cssImports.join('\n'), "\n");
|
|
151
149
|
umdTemplate = "".concat(imports.join('\n'), "\n\n").concat(cssImports.join('\n'), "\n\n").concat(install, "\nexport {\n install,\n ").concat(publicComponents.join(',\n '), "\n}\n\nexport default {\n install,\n ").concat(publicComponents.join(',\n '), "\n}\n");
|
|
152
|
-
lessTemplate = "".concat(lessImports.join('\n'), "\n");
|
|
153
150
|
return [4 /*yield*/, Promise.all([
|
|
154
151
|
(0, fs_extra_1.writeFile)((0, path_1.resolve)(dir, 'index.js'), indexTemplate, 'utf-8'),
|
|
155
152
|
(0, fs_extra_1.writeFile)((0, path_1.resolve)(dir, 'umdIndex.js'), umdTemplate, 'utf-8'),
|
|
156
153
|
(0, fs_extra_1.writeFile)((0, path_1.resolve)(dir, 'style.js'), styleTemplate, 'utf-8'),
|
|
157
|
-
(0, fs_extra_1.writeFile)((0, path_1.resolve)(dir, 'less.js'), lessTemplate, 'utf-8'),
|
|
158
154
|
])];
|
|
159
155
|
case 1:
|
|
160
156
|
_a.sent();
|
|
@@ -166,14 +162,13 @@ function compileESEntry(dir, publicDirs) {
|
|
|
166
162
|
exports.compileESEntry = compileESEntry;
|
|
167
163
|
function compileCommonJSEntry(dir, publicDirs) {
|
|
168
164
|
return __awaiter(this, void 0, void 0, function () {
|
|
169
|
-
var requires, plugins, cssRequires,
|
|
165
|
+
var requires, plugins, cssRequires, publicComponents, install, indexTemplate, styleTemplate;
|
|
170
166
|
return __generator(this, function (_a) {
|
|
171
167
|
switch (_a.label) {
|
|
172
168
|
case 0:
|
|
173
169
|
requires = [];
|
|
174
170
|
plugins = [];
|
|
175
171
|
cssRequires = [];
|
|
176
|
-
lessRequires = [];
|
|
177
172
|
publicComponents = [];
|
|
178
173
|
publicDirs.forEach(function (dirname) {
|
|
179
174
|
var publicComponent = (0, shared_1.bigCamelize)(dirname);
|
|
@@ -181,16 +176,13 @@ function compileCommonJSEntry(dir, publicDirs) {
|
|
|
181
176
|
requires.push("var ".concat(publicComponent, " = require('./").concat(dirname, "')['default']"));
|
|
182
177
|
plugins.push("".concat(publicComponent, ".install && app.use(").concat(publicComponent, ")"));
|
|
183
178
|
cssRequires.push("require('./".concat(dirname, "/style')"));
|
|
184
|
-
lessRequires.push("require('./".concat(dirname, "/style/less')"));
|
|
185
179
|
});
|
|
186
180
|
install = "\nfunction install(app) {\n ".concat(plugins.join('\n '), "\n}\n");
|
|
187
181
|
indexTemplate = "".concat(requires.join('\n'), "\n\n").concat(install, "\n\nmodule.exports = {\n install,\n ").concat(publicComponents.join(',\n '), "\n}\n");
|
|
188
182
|
styleTemplate = "".concat(cssRequires.join('\n'), "\n");
|
|
189
|
-
lessTemplate = "".concat(lessRequires.join('\n'), "\n");
|
|
190
183
|
return [4 /*yield*/, Promise.all([
|
|
191
184
|
(0, fs_extra_1.writeFile)((0, path_1.resolve)(dir, 'index.js'), indexTemplate, 'utf-8'),
|
|
192
185
|
(0, fs_extra_1.writeFile)((0, path_1.resolve)(dir, 'style.js'), styleTemplate, 'utf-8'),
|
|
193
|
-
(0, fs_extra_1.writeFile)((0, path_1.resolve)(dir, 'less.js'), lessTemplate, 'utf-8'),
|
|
194
186
|
])];
|
|
195
187
|
case 1:
|
|
196
188
|
_a.sent();
|
|
@@ -7,5 +7,5 @@ export declare const REQUIRE_LESS_RE: RegExp;
|
|
|
7
7
|
export declare const STYLE_IMPORT_RE: RegExp;
|
|
8
8
|
export declare const clearEmptyLine: (s: string) => string;
|
|
9
9
|
export declare function normalizeStyleDependency(styleImport: string, reg: RegExp): string;
|
|
10
|
-
export declare function extractStyleDependencies(file: string, code: string,
|
|
10
|
+
export declare function extractStyleDependencies(file: string, code: string, styleReg: RegExp): string;
|
|
11
11
|
export declare function compileLess(file: string): Promise<void>;
|
|
@@ -52,34 +52,23 @@ var clearEmptyLine = function (s) { return s.replace(exports.EMPTY_LINE_RE, '').
|
|
|
52
52
|
exports.clearEmptyLine = clearEmptyLine;
|
|
53
53
|
function normalizeStyleDependency(styleImport, reg) {
|
|
54
54
|
var relativePath = styleImport.replace(reg, '$1');
|
|
55
|
-
relativePath = relativePath.replace(/(
|
|
55
|
+
relativePath = relativePath.replace(/(\.less)|(\.css)/, '');
|
|
56
56
|
if (relativePath.startsWith('./')) {
|
|
57
57
|
return '.' + relativePath;
|
|
58
58
|
}
|
|
59
59
|
return '../' + relativePath;
|
|
60
60
|
}
|
|
61
61
|
exports.normalizeStyleDependency = normalizeStyleDependency;
|
|
62
|
-
function extractStyleDependencies(file, code,
|
|
62
|
+
function extractStyleDependencies(file, code, styleReg) {
|
|
63
63
|
var _a;
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
var cssFile = (0, path_1.resolve)(dir, './style/index.js');
|
|
67
|
-
var lessFile = (0, path_1.resolve)(dir, './style/less.js');
|
|
64
|
+
var styleImports = (_a = code.match(styleReg)) !== null && _a !== void 0 ? _a : [];
|
|
65
|
+
var cssFile = (0, path_1.resolve)((0, path_1.parse)(file).dir, './style/index.js');
|
|
68
66
|
var modules = process.env.BABEL_MODULE;
|
|
69
67
|
styleImports.forEach(function (styleImport) {
|
|
70
|
-
var normalizedPath = normalizeStyleDependency(styleImport,
|
|
68
|
+
var normalizedPath = normalizeStyleDependency(styleImport, styleReg);
|
|
71
69
|
(0, fsUtils_1.smartAppendFileSync)(cssFile, modules === 'commonjs' ? "require('".concat(normalizedPath, ".css')\n") : "import '".concat(normalizedPath, ".css'\n"));
|
|
72
|
-
(0, fsUtils_1.smartAppendFileSync)(lessFile, modules === 'commonjs' ? "require('".concat(normalizedPath, ".").concat(expect, "')\n") : "import '".concat(normalizedPath, ".").concat(expect, "'\n"));
|
|
73
70
|
});
|
|
74
|
-
|
|
75
|
-
(0, fsUtils_1.smartAppendFileSync)(cssFile, modules === 'commonjs'
|
|
76
|
-
? "require('".concat(normalizeStyleDependency(base, reg), ".css')\n")
|
|
77
|
-
: "import '".concat(normalizeStyleDependency(base, reg), ".css'\n"));
|
|
78
|
-
(0, fsUtils_1.smartAppendFileSync)(lessFile, modules === 'commonjs'
|
|
79
|
-
? "require('".concat(normalizeStyleDependency(base, reg), ".").concat(expect, "')\n")
|
|
80
|
-
: "import '".concat(normalizeStyleDependency(base, reg), ".").concat(expect, "'\n"));
|
|
81
|
-
}
|
|
82
|
-
return code.replace(reg, '');
|
|
71
|
+
return code.replace(styleReg, '');
|
|
83
72
|
}
|
|
84
73
|
exports.extractStyleDependencies = extractStyleDependencies;
|
|
85
74
|
function compileLess(file) {
|
|
@@ -92,6 +81,7 @@ function compileLess(file) {
|
|
|
92
81
|
return [4 /*yield*/, (0, less_1.render)(source, { filename: file })];
|
|
93
82
|
case 1:
|
|
94
83
|
css = (_a.sent()).css;
|
|
84
|
+
(0, fs_extra_1.removeSync)(file);
|
|
95
85
|
(0, fs_extra_1.writeFileSync)((0, fsUtils_1.replaceExt)(file, '.css'), (0, exports.clearEmptyLine)(css), 'utf-8');
|
|
96
86
|
return [2 /*return*/];
|
|
97
87
|
}
|
|
@@ -49,7 +49,7 @@ function generateReference(moduleDir) {
|
|
|
49
49
|
exports.generateReference = generateReference;
|
|
50
50
|
function compileTypes() {
|
|
51
51
|
return __awaiter(this, void 0, void 0, function () {
|
|
52
|
-
var varletConfig, namespace, name, dir, ignoreEntryDir, exports, declares,
|
|
52
|
+
var varletConfig, namespace, name, dir, ignoreEntryDir, exports, declares, globalDeclares, template;
|
|
53
53
|
return __generator(this, function (_a) {
|
|
54
54
|
switch (_a.label) {
|
|
55
55
|
case 0:
|
|
@@ -72,12 +72,9 @@ function compileTypes() {
|
|
|
72
72
|
declares.push("".concat((0, shared_1.bigCamelize)(namespace)).concat((0, shared_1.bigCamelize)(componentName), ": typeof import('").concat(name, "')['_").concat((0, shared_1.bigCamelize)(componentName), "Component']"));
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return [4 /*yield*/, Promise.all([
|
|
78
|
-
(0, fs_extra_1.writeFile)((0, path_1.resolve)(constant_1.TYPES_DIR, 'index.d.ts'), template),
|
|
79
|
-
(0, fs_extra_1.writeFile)((0, path_1.resolve)(constant_1.TYPES_DIR, 'global.d.ts'), globalTemplate),
|
|
80
|
-
])];
|
|
75
|
+
globalDeclares = "declare module 'vue' {\n export interface GlobalComponents {\n ".concat(declares.join('\n '), "\n }\n}");
|
|
76
|
+
template = "import type { App } from 'vue'\n\nexport const install: (app: App) => void\n\n".concat(exports.join('\n'), "\n\n").concat(globalDeclares, "\n");
|
|
77
|
+
return [4 /*yield*/, Promise.all([(0, fs_extra_1.writeFile)((0, path_1.resolve)(constant_1.TYPES_DIR, 'index.d.ts'), template)])];
|
|
81
78
|
case 3:
|
|
82
79
|
_a.sent();
|
|
83
80
|
return [2 /*return*/];
|
|
@@ -23,6 +23,7 @@ function getRootConfig() {
|
|
|
23
23
|
return {};
|
|
24
24
|
}
|
|
25
25
|
module.exports = __assign({ moduleNameMapper: {
|
|
26
|
+
'^@config$': '<rootDir>/.varlet/site.config.json',
|
|
26
27
|
'\\.(css|less)$': constant_1.JEST_STYLE_MOCK,
|
|
27
28
|
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': constant_1.JEST_MEDIA_MOCK,
|
|
28
29
|
}, transform: {
|
|
@@ -64,7 +64,7 @@ function getBuildConfig(varletConfig) {
|
|
|
64
64
|
var devConfig = getDevConfig(varletConfig);
|
|
65
65
|
return __assign(__assign({}, devConfig), { base: './', build: {
|
|
66
66
|
outDir: constant_1.SITE_OUTPUT_PATH,
|
|
67
|
-
|
|
67
|
+
reportCompressedSize: false,
|
|
68
68
|
emptyOutDir: true,
|
|
69
69
|
cssTarget: 'chrome61',
|
|
70
70
|
rollupOptions: {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const plugin_vue_1 = __importDefault(require("@vitejs/plugin-vue"));
|
|
7
|
+
const plugin_vue_jsx_1 = __importDefault(require("@vitejs/plugin-vue-jsx"));
|
|
8
|
+
const config_1 = require("vitest/config");
|
|
9
|
+
const constant_1 = require("../shared/constant");
|
|
10
|
+
exports.default = (0, config_1.defineConfig)({
|
|
11
|
+
resolve: {
|
|
12
|
+
alias: {
|
|
13
|
+
'@config': constant_1.SITE_CONFIG,
|
|
14
|
+
},
|
|
15
|
+
extensions: constant_1.VITE_RESOLVE_EXTENSIONS,
|
|
16
|
+
},
|
|
17
|
+
plugins: [(0, plugin_vue_1.default)(), (0, plugin_vue_jsx_1.default)()],
|
|
18
|
+
test: {
|
|
19
|
+
environment: 'jsdom',
|
|
20
|
+
coverage: {
|
|
21
|
+
provider: 'istanbul',
|
|
22
|
+
},
|
|
23
|
+
globals: true,
|
|
24
|
+
transformMode: {
|
|
25
|
+
web: [/\.[jt]sx$/],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
});
|
package/lib/index.js
CHANGED
|
@@ -24,6 +24,7 @@ var logger_1 = __importDefault(require("./shared/logger"));
|
|
|
24
24
|
var commander_1 = require("commander");
|
|
25
25
|
var dev_1 = require("./commands/dev");
|
|
26
26
|
var build_1 = require("./commands/build");
|
|
27
|
+
var vite_1 = require("./commands/vite");
|
|
27
28
|
var compile_1 = require("./commands/compile");
|
|
28
29
|
var create_1 = require("./commands/create");
|
|
29
30
|
var jest_1 = require("./commands/jest");
|
|
@@ -41,6 +42,14 @@ program
|
|
|
41
42
|
.description('Run varlet development environment')
|
|
42
43
|
.action(dev_1.dev);
|
|
43
44
|
program.command('build').description('Build varlet site for production').action(build_1.build);
|
|
45
|
+
program
|
|
46
|
+
.command('build:vite')
|
|
47
|
+
.description('Use vite build app for production')
|
|
48
|
+
.action(function () { return (0, vite_1.vite)('build'); });
|
|
49
|
+
program
|
|
50
|
+
.command('dev:vite')
|
|
51
|
+
.description('Use vite start server for development')
|
|
52
|
+
.action(function () { return (0, vite_1.vite)('dev'); });
|
|
44
53
|
program.command('preview').description('Preview varlet site for production').action(preview_1.preview);
|
|
45
54
|
program
|
|
46
55
|
.command('compile')
|
|
@@ -49,9 +58,12 @@ program
|
|
|
49
58
|
.action(compile_1.compile);
|
|
50
59
|
program.command('lint').description('Lint code').action(lint_1.lint);
|
|
51
60
|
program
|
|
52
|
-
.command('create
|
|
61
|
+
.command('create')
|
|
53
62
|
.description('Create a component directory')
|
|
54
|
-
.option('-
|
|
63
|
+
.option('-n, --name <componentName>', 'Component name')
|
|
64
|
+
.option('-s, --sfc', 'Generate files in sfc format')
|
|
65
|
+
.option('-t, --tsx', 'Generate files in tsx format')
|
|
66
|
+
.option('-l, --locale', 'Generator internationalized files')
|
|
55
67
|
.action(create_1.create);
|
|
56
68
|
program
|
|
57
69
|
.command('jest')
|
|
@@ -61,7 +73,14 @@ program
|
|
|
61
73
|
.option('-c, --component <componentName>', 'Test a specific component')
|
|
62
74
|
.option('-cc --clearCache', 'Clear test cache')
|
|
63
75
|
.action(jest_1.jest);
|
|
64
|
-
program
|
|
76
|
+
program
|
|
77
|
+
.command('gen')
|
|
78
|
+
.description('Generate cli application')
|
|
79
|
+
.option('-n, --name <applicationName>', 'Application name')
|
|
80
|
+
.option('-s, --sfc', 'Generate files in sfc format')
|
|
81
|
+
.option('-t, --tsx', 'Generate files in tsx format')
|
|
82
|
+
.option('-l, --locale', 'Generator internationalized files')
|
|
83
|
+
.action(gen_1.gen);
|
|
65
84
|
program
|
|
66
85
|
.command('changelog')
|
|
67
86
|
.option('-rc --releaseCount <releaseCount>', 'Release count')
|
package/lib/shared/constant.js
CHANGED
|
@@ -21,7 +21,7 @@ exports.LOCALE_DIR_NAME = 'locale';
|
|
|
21
21
|
exports.DOCS_DIR_NAME = 'docs';
|
|
22
22
|
exports.DIR_INDEX = 'index.vue';
|
|
23
23
|
exports.TESTS_DIR_NAME = '__tests__';
|
|
24
|
-
exports.GENERATORS_DIR = (0, path_1.resolve)(__dirname, '../../generators');
|
|
24
|
+
exports.GENERATORS_DIR = (0, path_1.resolve)(__dirname, '../../template/generators');
|
|
25
25
|
exports.UI_PACKAGE_JSON = (0, path_1.resolve)(exports.CWD, 'package.json');
|
|
26
26
|
exports.CLI_PACKAGE_JSON = (0, path_1.resolve)(__dirname, '../../package.json');
|
|
27
27
|
// site
|
package/lib/shared/logger.d.ts
CHANGED
package/lib/shared/logger.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.1663742071515",
|
|
4
4
|
"description": "cli of varlet",
|
|
5
5
|
"bin": {
|
|
6
6
|
"varlet-cli": "./lib/index.js"
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"author": "haoziqaq <357229046@qq.com>",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"files": [
|
|
15
|
-
"generators",
|
|
16
15
|
"lib",
|
|
16
|
+
"template",
|
|
17
17
|
"site",
|
|
18
18
|
"tsconfig.json",
|
|
19
19
|
"varlet.default.config.js",
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
"url": "https://github.com/varletjs/varlet/issues"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@varlet/icons": "1.27.20",
|
|
32
|
-
"@varlet/shared": "1.27.20",
|
|
33
|
-
"@varlet/markdown-vite-plugin": "1.27.20",
|
|
34
|
-
"@varlet/touch-emulator": "1.27.20",
|
|
35
31
|
"@babel/core": "^7.14.8",
|
|
36
32
|
"@babel/helper-plugin-utils": "^7.14.5",
|
|
37
33
|
"@babel/preset-env": "^7.14.8",
|
|
38
34
|
"@babel/preset-typescript": "^7.14.5",
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
35
|
+
"@varlet/icons": "2.0.0-alpha.1663742071515",
|
|
36
|
+
"@varlet/markdown-vite-plugin": "2.0.0-alpha.1663742071515",
|
|
37
|
+
"@varlet/shared": "2.0.0-alpha.1663742071515",
|
|
38
|
+
"@varlet/touch-emulator": "2.0.0-alpha.1663742071515",
|
|
39
|
+
"@vitejs/plugin-vue": "3.0.1",
|
|
40
|
+
"@vitejs/plugin-vue-jsx": "2.0.0",
|
|
41
41
|
"@vue/babel-plugin-jsx": "1.1.1",
|
|
42
42
|
"@vue/compiler-sfc": "3.2.25",
|
|
43
43
|
"@vue/runtime-core": "3.2.25",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"chokidar": "^3.5.2",
|
|
47
47
|
"commander": "^8.3.0",
|
|
48
48
|
"conventional-changelog": "^3.1.25",
|
|
49
|
+
"ejs": "^3.1.8",
|
|
49
50
|
"execa": "^5.0.0",
|
|
50
51
|
"fs-extra": "^9.0.1",
|
|
51
52
|
"glob": "^7.2.0",
|
|
@@ -60,29 +61,32 @@
|
|
|
60
61
|
"slash": "^3.0.0",
|
|
61
62
|
"ts-jest": "^26.5.1",
|
|
62
63
|
"typescript": "^4.4.4",
|
|
63
|
-
"vite": "
|
|
64
|
+
"vite": "3.0.4",
|
|
64
65
|
"vite-plugin-html": "^2.1.0",
|
|
65
66
|
"vue": "3.2.25",
|
|
66
67
|
"vue-jest": "^5.0.0-alpha.8"
|
|
67
68
|
},
|
|
68
69
|
"devDependencies": {
|
|
69
70
|
"@types/babel__core": "^7.1.12",
|
|
71
|
+
"@types/ejs": "^3.1.1",
|
|
70
72
|
"@types/fs-extra": "^9.0.2",
|
|
71
73
|
"@types/glob": "^7.1.3",
|
|
72
74
|
"@types/hash-sum": "^1.0.0",
|
|
75
|
+
"@types/inquirer": "8.1.2",
|
|
73
76
|
"@types/jest": "^26.0.15",
|
|
74
77
|
"@types/lodash": "^4.14.174",
|
|
75
78
|
"@types/lodash-es": "^4.17.5",
|
|
76
79
|
"@types/semver": "^7.3.9"
|
|
77
80
|
},
|
|
78
81
|
"peerDependencies": {
|
|
79
|
-
"@varlet/touch-emulator": "
|
|
80
|
-
"@vue/
|
|
82
|
+
"@varlet/touch-emulator": "2.0.0-alpha.1663742071515",
|
|
83
|
+
"@vue/runtime-core": "3.2.16",
|
|
84
|
+
"@vue/test-utils": "^2.0.2",
|
|
85
|
+
"jsdom": "^20.0.0",
|
|
81
86
|
"clipboard": "^2.0.6",
|
|
82
87
|
"live-server": "^1.2.1",
|
|
83
88
|
"lodash-es": "^4.17.21",
|
|
84
89
|
"vue": "3.2.25",
|
|
85
|
-
"@vue/runtime-core": "3.2.16",
|
|
86
90
|
"vue-router": "4.0.12"
|
|
87
91
|
},
|
|
88
92
|
"scripts": {
|