g-ui-web 1.4.40 → 1.4.41
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/lib/g-ui-web.cjs +53 -60
- package/lib/g-ui-web.iife.js +53 -60
- package/lib/g-ui-web.iife.js.gz +0 -0
- package/lib/g-ui-web.js +28454 -28628
- package/lib/g-ui-web.js.gz +0 -0
- package/lib/g-ui-web.umd.cjs +53 -60
- package/lib/plugins/index.cjs +7 -9
- package/lib/plugins/index.mjs +7 -9
- package/lib/text-select/src/index.vue.d.ts +1 -1
- package/package.json +1 -1
package/lib/plugins/index.cjs
CHANGED
|
@@ -88,6 +88,8 @@ var init = WebAssembly.compile(E()).then(WebAssembly.instantiate).then(({ export
|
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
// packages/plugins/component-usage.ts
|
|
91
|
+
var import_fs = require("fs");
|
|
92
|
+
var import_path = require("path");
|
|
91
93
|
function componentUsagePlugin(options = {}) {
|
|
92
94
|
const { libraryName = "", reportUrl = "", extraData = {}, enableInDev = false } = options;
|
|
93
95
|
const importStats = {
|
|
@@ -199,15 +201,11 @@ function componentUsagePlugin(options = {}) {
|
|
|
199
201
|
topComponents: [...importStats.componentCount.entries()].sort((a, b) => b[1] - a[1]).slice(0, 20).map(([name, count]) => ({ name, count })),
|
|
200
202
|
...extraData
|
|
201
203
|
};
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
console.log(`
|
|
206
|
-
|
|
207
|
-
console.log("\n Top 10 \u7EC4\u4EF6:");
|
|
208
|
-
reportData.topComponents.slice(0, 10).forEach((item, index) => {
|
|
209
|
-
console.log(` ${index + 1}. ${item.name}: ${item.count} \u6B21`);
|
|
210
|
-
});
|
|
204
|
+
const outputPath = (0, import_path.resolve)(process.cwd(), "component-usage-report.json");
|
|
205
|
+
(0, import_fs.mkdirSync)((0, import_path.dirname)(outputPath), { recursive: true });
|
|
206
|
+
(0, import_fs.writeFileSync)(outputPath, JSON.stringify(reportData, null, 2), "utf-8");
|
|
207
|
+
console.log(`
|
|
208
|
+
\u{1F4CA} \u7EC4\u4EF6\u5F15\u7528\u7EDF\u8BA1\u62A5\u544A\u5DF2\u751F\u6210: ${outputPath}`);
|
|
211
209
|
if (reportUrl) {
|
|
212
210
|
try {
|
|
213
211
|
const response = await fetch(reportUrl, {
|
package/lib/plugins/index.mjs
CHANGED
|
@@ -62,6 +62,8 @@ var init = WebAssembly.compile(E()).then(WebAssembly.instantiate).then(({ export
|
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
// packages/plugins/component-usage.ts
|
|
65
|
+
import { writeFileSync, mkdirSync } from "fs";
|
|
66
|
+
import { resolve, dirname } from "path";
|
|
65
67
|
function componentUsagePlugin(options = {}) {
|
|
66
68
|
const { libraryName = "", reportUrl = "", extraData = {}, enableInDev = false } = options;
|
|
67
69
|
const importStats = {
|
|
@@ -173,15 +175,11 @@ function componentUsagePlugin(options = {}) {
|
|
|
173
175
|
topComponents: [...importStats.componentCount.entries()].sort((a, b) => b[1] - a[1]).slice(0, 20).map(([name, count]) => ({ name, count })),
|
|
174
176
|
...extraData
|
|
175
177
|
};
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
console.log(`
|
|
180
|
-
|
|
181
|
-
console.log("\n Top 10 \u7EC4\u4EF6:");
|
|
182
|
-
reportData.topComponents.slice(0, 10).forEach((item, index) => {
|
|
183
|
-
console.log(` ${index + 1}. ${item.name}: ${item.count} \u6B21`);
|
|
184
|
-
});
|
|
178
|
+
const outputPath = resolve(process.cwd(), "component-usage-report.json");
|
|
179
|
+
mkdirSync(dirname(outputPath), { recursive: true });
|
|
180
|
+
writeFileSync(outputPath, JSON.stringify(reportData, null, 2), "utf-8");
|
|
181
|
+
console.log(`
|
|
182
|
+
\u{1F4CA} \u7EC4\u4EF6\u5F15\u7528\u7EDF\u8BA1\u62A5\u544A\u5DF2\u751F\u6210: ${outputPath}`);
|
|
185
183
|
if (reportUrl) {
|
|
186
184
|
try {
|
|
187
185
|
const response = await fetch(reportUrl, {
|
|
@@ -187,7 +187,7 @@ declare function __VLS_template(): {
|
|
|
187
187
|
contentRef: Ref<HTMLElement | undefined>;
|
|
188
188
|
triggeringElementRef: Ref<any>;
|
|
189
189
|
referenceElementRef: Ref<any>;
|
|
190
|
-
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("
|
|
190
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("click" | "visible-change" | "command")[], import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, {
|
|
191
191
|
readonly disabled: boolean;
|
|
192
192
|
readonly maxHeight: string | number;
|
|
193
193
|
readonly size: string;
|