g-ui-web 1.4.43 → 1.4.44
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/plugins/index.cjs +8 -5
- package/lib/plugins/index.mjs +8 -5
- package/package.json +1 -1
package/lib/plugins/index.cjs
CHANGED
|
@@ -100,6 +100,7 @@ function componentUsagePlugin(options = {}) {
|
|
|
100
100
|
// 总引用次数
|
|
101
101
|
totalImports: 0
|
|
102
102
|
};
|
|
103
|
+
const excludeNames = /* @__PURE__ */ new Set(["GuiWeb", "DataSource", "useDataSource"]);
|
|
103
104
|
let isBuild = false;
|
|
104
105
|
let hasReported = false;
|
|
105
106
|
return {
|
|
@@ -143,7 +144,7 @@ function componentUsagePlugin(options = {}) {
|
|
|
143
144
|
return parts[0].trim();
|
|
144
145
|
});
|
|
145
146
|
components.forEach((comp) => {
|
|
146
|
-
if (comp) {
|
|
147
|
+
if (comp && !excludeNames.has(comp)) {
|
|
147
148
|
const currentCount = importStats.componentCount.get(comp) || 0;
|
|
148
149
|
importStats.componentCount.set(comp, currentCount + 1);
|
|
149
150
|
componentsInFile.push(comp);
|
|
@@ -154,10 +155,12 @@ function componentUsagePlugin(options = {}) {
|
|
|
154
155
|
const defaultImportMatch = importStatement.match(/import\s+(\w+)\s+from/);
|
|
155
156
|
if (defaultImportMatch && !importStatement.includes("{")) {
|
|
156
157
|
const comp = defaultImportMatch[1];
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
if (!excludeNames.has(comp)) {
|
|
159
|
+
const currentCount = importStats.componentCount.get(comp) || 0;
|
|
160
|
+
importStats.componentCount.set(comp, currentCount + 1);
|
|
161
|
+
componentsInFile.push(comp);
|
|
162
|
+
importStats.totalImports++;
|
|
163
|
+
}
|
|
161
164
|
}
|
|
162
165
|
}
|
|
163
166
|
});
|
package/lib/plugins/index.mjs
CHANGED
|
@@ -74,6 +74,7 @@ function componentUsagePlugin(options = {}) {
|
|
|
74
74
|
// 总引用次数
|
|
75
75
|
totalImports: 0
|
|
76
76
|
};
|
|
77
|
+
const excludeNames = /* @__PURE__ */ new Set(["GuiWeb", "DataSource", "useDataSource"]);
|
|
77
78
|
let isBuild = false;
|
|
78
79
|
let hasReported = false;
|
|
79
80
|
return {
|
|
@@ -117,7 +118,7 @@ function componentUsagePlugin(options = {}) {
|
|
|
117
118
|
return parts[0].trim();
|
|
118
119
|
});
|
|
119
120
|
components.forEach((comp) => {
|
|
120
|
-
if (comp) {
|
|
121
|
+
if (comp && !excludeNames.has(comp)) {
|
|
121
122
|
const currentCount = importStats.componentCount.get(comp) || 0;
|
|
122
123
|
importStats.componentCount.set(comp, currentCount + 1);
|
|
123
124
|
componentsInFile.push(comp);
|
|
@@ -128,10 +129,12 @@ function componentUsagePlugin(options = {}) {
|
|
|
128
129
|
const defaultImportMatch = importStatement.match(/import\s+(\w+)\s+from/);
|
|
129
130
|
if (defaultImportMatch && !importStatement.includes("{")) {
|
|
130
131
|
const comp = defaultImportMatch[1];
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
if (!excludeNames.has(comp)) {
|
|
133
|
+
const currentCount = importStats.componentCount.get(comp) || 0;
|
|
134
|
+
importStats.componentCount.set(comp, currentCount + 1);
|
|
135
|
+
componentsInFile.push(comp);
|
|
136
|
+
importStats.totalImports++;
|
|
137
|
+
}
|
|
135
138
|
}
|
|
136
139
|
}
|
|
137
140
|
});
|