@vef-framework/dev 1.0.128 → 1.0.129
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/cjs/cli.cjs +4 -227
- package/cjs/commitlint-config.cjs +1 -13
- package/cjs/config.cjs +1 -81
- package/cjs/constants.cjs +1 -26
- package/cjs/eslint-config.cjs +1 -412
- package/cjs/index.cjs +1 -15
- package/cjs/json/monaco.nls.json.cjs +15920 -7
- package/cjs/json/monaco.theme.github-light.json.cjs +349 -7
- package/cjs/modules.d.cjs +0 -2
- package/cjs/plugin-app-config.cjs +1 -36
- package/cjs/plugin-conventional-config.cjs +3 -107
- package/cjs/plugin-eslint.cjs +1 -22
- package/cjs/plugin-html.cjs +2 -70
- package/cjs/plugin-icons.cjs +1 -20
- package/cjs/plugin-initialization.cjs +3 -26
- package/cjs/plugin-injection.cjs +2 -19
- package/cjs/plugin-inspect.cjs +1 -13
- package/cjs/plugin-monaco-nls.cjs +3 -59
- package/cjs/plugin-react-swc.cjs +1 -12
- package/cjs/plugin-router.cjs +4 -40
- package/cjs/plugin-stylelint.cjs +1 -22
- package/cjs/plugin-svgr.cjs +1 -57
- package/cjs/plugin-tailwind.cjs +1 -10
- package/cjs/plugin-tailwindcss.cjs +2 -23
- package/cjs/plugin-tsconfig-paths.cjs +1 -12
- package/cjs/plugin-visualizer.cjs +1 -14
- package/cjs/plugin-webfont.cjs +1 -13
- package/cjs/stylelint-config.cjs +1 -66
- package/cjs/tailwind-config.cjs +1 -394
- package/cjs/types.cjs +0 -2
- package/esm/cli.js +4 -225
- package/esm/commitlint-config.js +1 -11
- package/esm/config.js +1 -79
- package/esm/constants.js +1 -14
- package/esm/eslint-config.js +1 -410
- package/esm/index.js +1 -7
- package/esm/json/monaco.nls.json.js +15920 -3
- package/esm/json/monaco.theme.github-light.json.js +349 -3
- package/esm/plugin-app-config.js +1 -34
- package/esm/plugin-conventional-config.js +3 -105
- package/esm/plugin-eslint.js +1 -20
- package/esm/plugin-html.js +2 -68
- package/esm/plugin-icons.js +1 -17
- package/esm/plugin-initialization.js +3 -24
- package/esm/plugin-injection.js +2 -17
- package/esm/plugin-inspect.js +1 -11
- package/esm/plugin-monaco-nls.js +3 -56
- package/esm/plugin-react-swc.js +1 -10
- package/esm/plugin-router.js +4 -38
- package/esm/plugin-stylelint.js +1 -20
- package/esm/plugin-svgr.js +1 -55
- package/esm/plugin-tailwind.js +1 -8
- package/esm/plugin-tailwindcss.js +2 -21
- package/esm/plugin-tsconfig-paths.js +1 -10
- package/esm/plugin-visualizer.js +1 -12
- package/esm/plugin-webfont.js +1 -11
- package/esm/stylelint-config.js +1 -64
- package/esm/tailwind-config.js +1 -392
- package/package.json +1 -1
- package/template/_package.json +5 -5
|
@@ -1,7 +1,349 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=`{
|
|
2
|
+
"base": "vs",
|
|
3
|
+
"inherit": true,
|
|
4
|
+
"rules": [
|
|
5
|
+
{
|
|
6
|
+
"background": "ffffff",
|
|
7
|
+
"token": ""
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"foreground": "6a737d",
|
|
11
|
+
"token": "comment"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"foreground": "6a737d",
|
|
15
|
+
"token": "punctuation.definition.comment"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"foreground": "6a737d",
|
|
19
|
+
"token": "string.comment"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"foreground": "005cc5",
|
|
23
|
+
"token": "constant"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"foreground": "005cc5",
|
|
27
|
+
"token": "entity.name.constant"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"foreground": "005cc5",
|
|
31
|
+
"token": "variable.other.constant"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"foreground": "005cc5",
|
|
35
|
+
"token": "variable.language"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"foreground": "6f42c1",
|
|
39
|
+
"token": "entity"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"foreground": "6f42c1",
|
|
43
|
+
"token": "entity.name"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"foreground": "24292e",
|
|
47
|
+
"token": "variable.parameter.function"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"foreground": "22863a",
|
|
51
|
+
"token": "entity.name.tag"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"foreground": "d73a49",
|
|
55
|
+
"token": "keyword"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"foreground": "d73a49",
|
|
59
|
+
"token": "storage"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"foreground": "d73a49",
|
|
63
|
+
"token": "storage.type"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"foreground": "24292e",
|
|
67
|
+
"token": "storage.modifier.package"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"foreground": "24292e",
|
|
71
|
+
"token": "storage.modifier.import"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"foreground": "24292e",
|
|
75
|
+
"token": "storage.type.java"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"foreground": "032f62",
|
|
79
|
+
"token": "string"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"foreground": "032f62",
|
|
83
|
+
"token": "punctuation.definition.string"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"foreground": "032f62",
|
|
87
|
+
"token": "string punctuation.section.embedded source"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"foreground": "005cc5",
|
|
91
|
+
"token": "support"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"foreground": "005cc5",
|
|
95
|
+
"token": "meta.property-name"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"foreground": "e36209",
|
|
99
|
+
"token": "variable"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"foreground": "24292e",
|
|
103
|
+
"token": "variable.other"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"foreground": "b31d28",
|
|
107
|
+
"fontStyle": "bold italic underline",
|
|
108
|
+
"token": "invalid.broken"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"foreground": "b31d28",
|
|
112
|
+
"fontStyle": "bold italic underline",
|
|
113
|
+
"token": "invalid.deprecated"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"foreground": "fafbfc",
|
|
117
|
+
"background": "b31d28",
|
|
118
|
+
"fontStyle": "italic underline",
|
|
119
|
+
"token": "invalid.illegal"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"foreground": "fafbfc",
|
|
123
|
+
"background": "d73a49",
|
|
124
|
+
"fontStyle": "italic underline",
|
|
125
|
+
"token": "carriage-return"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"foreground": "b31d28",
|
|
129
|
+
"fontStyle": "bold italic underline",
|
|
130
|
+
"token": "invalid.unimplemented"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"foreground": "b31d28",
|
|
134
|
+
"token": "message.error"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"foreground": "24292e",
|
|
138
|
+
"token": "string source"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"foreground": "005cc5",
|
|
142
|
+
"token": "string variable"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"foreground": "032f62",
|
|
146
|
+
"token": "source.regexp"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"foreground": "032f62",
|
|
150
|
+
"token": "string.regexp"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"foreground": "032f62",
|
|
154
|
+
"token": "string.regexp.character-class"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"foreground": "032f62",
|
|
158
|
+
"token": "string.regexp constant.character.escape"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"foreground": "032f62",
|
|
162
|
+
"token": "string.regexp source.ruby.embedded"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"foreground": "032f62",
|
|
166
|
+
"token": "string.regexp string.regexp.arbitrary-repitition"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"foreground": "22863a",
|
|
170
|
+
"fontStyle": "bold",
|
|
171
|
+
"token": "string.regexp constant.character.escape"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"foreground": "005cc5",
|
|
175
|
+
"token": "support.constant"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"foreground": "005cc5",
|
|
179
|
+
"token": "support.variable"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"foreground": "005cc5",
|
|
183
|
+
"token": "meta.module-reference"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"foreground": "735c0f",
|
|
187
|
+
"token": "markup.list"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"foreground": "005cc5",
|
|
191
|
+
"fontStyle": "bold",
|
|
192
|
+
"token": "markup.heading"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"foreground": "005cc5",
|
|
196
|
+
"fontStyle": "bold",
|
|
197
|
+
"token": "markup.heading entity.name"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"foreground": "22863a",
|
|
201
|
+
"token": "markup.quote"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"foreground": "24292e",
|
|
205
|
+
"fontStyle": "italic",
|
|
206
|
+
"token": "markup.italic"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"foreground": "24292e",
|
|
210
|
+
"fontStyle": "bold",
|
|
211
|
+
"token": "markup.bold"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"foreground": "005cc5",
|
|
215
|
+
"token": "markup.raw"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"foreground": "b31d28",
|
|
219
|
+
"background": "ffeef0",
|
|
220
|
+
"token": "markup.deleted"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"foreground": "b31d28",
|
|
224
|
+
"background": "ffeef0",
|
|
225
|
+
"token": "meta.diff.header.from-file"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"foreground": "b31d28",
|
|
229
|
+
"background": "ffeef0",
|
|
230
|
+
"token": "punctuation.definition.deleted"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"foreground": "22863a",
|
|
234
|
+
"background": "f0fff4",
|
|
235
|
+
"token": "markup.inserted"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"foreground": "22863a",
|
|
239
|
+
"background": "f0fff4",
|
|
240
|
+
"token": "meta.diff.header.to-file"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"foreground": "22863a",
|
|
244
|
+
"background": "f0fff4",
|
|
245
|
+
"token": "punctuation.definition.inserted"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"foreground": "e36209",
|
|
249
|
+
"background": "ffebda",
|
|
250
|
+
"token": "markup.changed"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"foreground": "e36209",
|
|
254
|
+
"background": "ffebda",
|
|
255
|
+
"token": "punctuation.definition.changed"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"foreground": "f6f8fa",
|
|
259
|
+
"background": "005cc5",
|
|
260
|
+
"token": "markup.ignored"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"foreground": "f6f8fa",
|
|
264
|
+
"background": "005cc5",
|
|
265
|
+
"token": "markup.untracked"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"foreground": "6f42c1",
|
|
269
|
+
"fontStyle": "bold",
|
|
270
|
+
"token": "meta.diff.range"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"foreground": "005cc5",
|
|
274
|
+
"token": "meta.diff.header"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"foreground": "005cc5",
|
|
278
|
+
"fontStyle": "bold",
|
|
279
|
+
"token": "meta.separator"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"foreground": "005cc5",
|
|
283
|
+
"token": "meta.output"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"foreground": "586069",
|
|
287
|
+
"token": "brackethighlighter.tag"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"foreground": "586069",
|
|
291
|
+
"token": "brackethighlighter.curly"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"foreground": "586069",
|
|
295
|
+
"token": "brackethighlighter.round"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"foreground": "586069",
|
|
299
|
+
"token": "brackethighlighter.square"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"foreground": "586069",
|
|
303
|
+
"token": "brackethighlighter.angle"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"foreground": "586069",
|
|
307
|
+
"token": "brackethighlighter.quote"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"foreground": "b31d28",
|
|
311
|
+
"token": "brackethighlighter.unmatched"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"foreground": "b31d28",
|
|
315
|
+
"token": "sublimelinter.mark.error"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"foreground": "e36209",
|
|
319
|
+
"token": "sublimelinter.mark.warning"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"foreground": "959da5",
|
|
323
|
+
"token": "sublimelinter.gutter-mark"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"foreground": "032f62",
|
|
327
|
+
"fontStyle": "underline",
|
|
328
|
+
"token": "constant.other.reference.link"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"foreground": "032f62",
|
|
332
|
+
"fontStyle": "underline",
|
|
333
|
+
"token": "string.other.link"
|
|
334
|
+
}
|
|
335
|
+
],
|
|
336
|
+
"colors": {
|
|
337
|
+
"editor.foreground": "#24292e",
|
|
338
|
+
"editor.background": "#fafafa",
|
|
339
|
+
"editor.selectionBackground": "#c8c8fa",
|
|
340
|
+
"editor.inactiveSelectionBackground": "#fafbfc",
|
|
341
|
+
"editor.lineHighlightBackground": "#fafbfc",
|
|
342
|
+
"editorCursor.foreground": "#24292e",
|
|
343
|
+
"editorWhitespace.foreground": "#959da5",
|
|
344
|
+
"editorIndentGuide.background": "#959da5",
|
|
345
|
+
"editorIndentGuide.activeBackground": "#24292e",
|
|
346
|
+
"editor.selectionHighlightBorder": "#fafbfc"
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
`;exports.default=e;
|
package/cjs/modules.d.cjs
CHANGED
|
@@ -1,37 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var radashi = require('radashi');
|
|
5
|
-
var config = require('unplugin-config/vite');
|
|
6
|
-
var constants = require('./constants.cjs');
|
|
7
|
-
|
|
8
|
-
"use strict";
|
|
9
|
-
function constantCase(value) {
|
|
10
|
-
return radashi.snake(value).toUpperCase();
|
|
11
|
-
}
|
|
12
|
-
function createAppConfigPlugin({
|
|
13
|
-
basePublicPath,
|
|
14
|
-
outputDir,
|
|
15
|
-
appName = constants.DEFAULT_APP_NAME
|
|
16
|
-
}) {
|
|
17
|
-
return config({
|
|
18
|
-
appName: `VEF_${constantCase(appName)}`,
|
|
19
|
-
baseDir: basePublicPath,
|
|
20
|
-
configFile: {
|
|
21
|
-
generate: true,
|
|
22
|
-
fileName: "app.config.js",
|
|
23
|
-
outputDir: outputDir ?? constants.DEFAULT_OUTPUT_DIR
|
|
24
|
-
},
|
|
25
|
-
htmlInjection: {
|
|
26
|
-
enable: true,
|
|
27
|
-
position: "head-prepend",
|
|
28
|
-
templates: ["index.html"]
|
|
29
|
-
},
|
|
30
|
-
envVariables: {
|
|
31
|
-
prefix: constants.ENV_APP_PREFIX,
|
|
32
|
-
files: ["env/.env", "env/.env.production"]
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
exports.createAppConfigPlugin = createAppConfigPlugin;
|
|
2
|
+
"use strict";var t=require("radashi"),a=require("unplugin-config/vite"),i=require("./constants.cjs");function p(e){return t.snake(e).toUpperCase()}function s({basePublicPath:e,outputDir:n,appName:r=i.DEFAULT_APP_NAME}){return a({appName:`VEF_${p(r)}`,baseDir:e,configFile:{generate:!0,fileName:"app.config.js",outputDir:n??i.DEFAULT_OUTPUT_DIR},htmlInjection:{enable:!0,position:"head-prepend",templates:["index.html"]},envVariables:{prefix:i.ENV_APP_PREFIX,files:["env/.env","env/.env.production"]}})}exports.createAppConfigPlugin=s;
|
|
@@ -1,116 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var process = require('node:process');
|
|
5
|
-
var constants = require('./constants.cjs');
|
|
6
|
-
|
|
7
|
-
"use strict";
|
|
8
|
-
function createConventionalConfigPlugin({
|
|
9
|
-
appName,
|
|
10
|
-
appVersion,
|
|
11
|
-
basePublicPath,
|
|
12
|
-
projectDir,
|
|
13
|
-
outputDir,
|
|
14
|
-
serverPort,
|
|
15
|
-
proxies
|
|
16
|
-
}) {
|
|
17
|
-
return {
|
|
18
|
-
name: "vef-framework:conventional-config",
|
|
19
|
-
config(_, { command }) {
|
|
20
|
-
const isDev = command === "serve";
|
|
21
|
-
return {
|
|
22
|
-
appType: "spa",
|
|
23
|
-
root: projectDir,
|
|
24
|
-
base: basePublicPath,
|
|
25
|
-
publicDir: "public",
|
|
26
|
-
envDir: constants.ENV_DIR,
|
|
27
|
-
envPrefix: [constants.ENV_BUILD_PREFIX, constants.ENV_APP_PREFIX],
|
|
28
|
-
define: {
|
|
29
|
-
__VEF_FRAMEWORK_VERSION__: `"${process.env.VEF_FRAMEWORK_VERSION}"`,
|
|
30
|
-
__VEF_APP_VERSION__: `"${appVersion}"`,
|
|
31
|
-
__VEF_APP_CONFIG__: isDev ? `
|
|
2
|
+
"use strict";var o=require("node:process"),e=require("./constants.cjs");function u({appName:i,appVersion:r,basePublicPath:n,projectDir:t,outputDir:a,serverPort:s,proxies:c}){return{name:"vef-framework:conventional-config",config(l,{command:m}){const _=m==="serve";return{appType:"spa",root:t,base:n,publicDir:"public",envDir:e.ENV_DIR,envPrefix:[e.ENV_BUILD_PREFIX,e.ENV_APP_PREFIX],define:{__VEF_FRAMEWORK_VERSION__:`"${o.env.VEF_FRAMEWORK_VERSION}"`,__VEF_APP_VERSION__:`"${r}"`,__VEF_APP_CONFIG__:_?`
|
|
32
3
|
(function () {
|
|
33
4
|
const env = import.meta.env;
|
|
34
|
-
const config = Object.keys(env).filter(key => key.startsWith(${JSON.stringify(
|
|
5
|
+
const config = Object.keys(env).filter(key => key.startsWith(${JSON.stringify(e.ENV_APP_PREFIX)}))
|
|
35
6
|
.reduce((acc, key) => {
|
|
36
7
|
acc[key] = env[key];
|
|
37
8
|
return acc;
|
|
38
9
|
}, {});
|
|
39
10
|
return Object.freeze(config);
|
|
40
11
|
})()
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
css: {
|
|
44
|
-
modules: {
|
|
45
|
-
scopeBehaviour: "local",
|
|
46
|
-
localsConvention: "camelCase"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
optimizeDeps: {
|
|
50
|
-
exclude: [],
|
|
51
|
-
esbuildOptions: {
|
|
52
|
-
plugins: []
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
esbuild: {
|
|
56
|
-
drop: ["console", "debugger"],
|
|
57
|
-
charset: "utf8",
|
|
58
|
-
minifyIdentifiers: true,
|
|
59
|
-
minifySyntax: false,
|
|
60
|
-
minifyWhitespace: true
|
|
61
|
-
},
|
|
62
|
-
build: {
|
|
63
|
-
outDir: outputDir ?? constants.DEFAULT_OUTPUT_DIR,
|
|
64
|
-
target: "modules",
|
|
65
|
-
assetsDir: constants.ASSETS_DIR,
|
|
66
|
-
assetsInlineLimit: 10240,
|
|
67
|
-
reportCompressedSize: false,
|
|
68
|
-
chunkSizeWarningLimit: 2048,
|
|
69
|
-
minify: true,
|
|
70
|
-
sourcemap: false,
|
|
71
|
-
rollupOptions: {
|
|
72
|
-
input: {
|
|
73
|
-
main: "index.html"
|
|
74
|
-
},
|
|
75
|
-
output: {
|
|
76
|
-
banner: `/*! Powered by VEF Framework v${process.env.VEF_FRAMEWORK_VERSION}.${appVersion ? ` App version v${appVersion}.` : ""} Built at ${(/* @__PURE__ */ new Date()).toISOString()} */`,
|
|
77
|
-
chunkFileNames: `${constants.ASSETS_DIR}/js/[name]-[hash].js`,
|
|
78
|
-
entryFileNames: `${constants.ASSETS_DIR}/js/[name]-[hash].js`,
|
|
79
|
-
assetFileNames: `${constants.ASSETS_DIR}/[ext]/[name]-[hash].[ext]`,
|
|
80
|
-
manualChunks: {
|
|
81
|
-
"react": ["react", "react-dom"],
|
|
82
|
-
"vef-shared": ["@vef-framework/shared"],
|
|
83
|
-
"vef-components": ["@vef-framework/components"],
|
|
84
|
-
"vef-hooks": ["@vef-framework/hooks"],
|
|
85
|
-
"vef-core": ["@vef-framework/core"],
|
|
86
|
-
"vef-starter": ["@vef-framework/starter"],
|
|
87
|
-
"vef-intellisense-code-editor": ["monaco-editor", "@monaco-editor/react"],
|
|
88
|
-
"vef-code-editor": [
|
|
89
|
-
"@uiw/react-codemirror",
|
|
90
|
-
"@uiw/codemirror-extensions-langs",
|
|
91
|
-
"@uiw/codemirror-theme-material",
|
|
92
|
-
"codemirror-json-schema",
|
|
93
|
-
"codemirror-json5",
|
|
94
|
-
"@codemirror/state",
|
|
95
|
-
"@codemirror/view",
|
|
96
|
-
"@codemirror/lint",
|
|
97
|
-
"@codemirror/language",
|
|
98
|
-
"@codemirror/lang-yaml",
|
|
99
|
-
"@codemirror/lang-json"
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
server: {
|
|
106
|
-
port: serverPort || constants.DEFAULT_SERVER_PORT,
|
|
107
|
-
host: true,
|
|
108
|
-
open: true,
|
|
109
|
-
proxy: proxies
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
exports.createConventionalConfigPlugin = createConventionalConfigPlugin;
|
|
12
|
+
`:`window.__PRODUCTION__VEF_${i??e.DEFAULT_APP_NAME}__CONF__`},css:{modules:{scopeBehaviour:"local",localsConvention:"camelCase"}},optimizeDeps:{exclude:[],esbuildOptions:{plugins:[]}},esbuild:{drop:["console","debugger"],charset:"utf8",minifyIdentifiers:!0,minifySyntax:!1,minifyWhitespace:!0},build:{outDir:a??e.DEFAULT_OUTPUT_DIR,target:"modules",assetsDir:e.ASSETS_DIR,assetsInlineLimit:10240,reportCompressedSize:!1,chunkSizeWarningLimit:2048,minify:!0,sourcemap:!1,rollupOptions:{input:{main:"index.html"},output:{banner:`/*! Powered by VEF Framework v${o.env.VEF_FRAMEWORK_VERSION}.${r?` App version v${r}.`:""} Built at ${new Date().toISOString()} */`,chunkFileNames:`${e.ASSETS_DIR}/js/[name]-[hash].js`,entryFileNames:`${e.ASSETS_DIR}/js/[name]-[hash].js`,assetFileNames:`${e.ASSETS_DIR}/[ext]/[name]-[hash].[ext]`,manualChunks:{react:["react","react-dom"],"vef-shared":["@vef-framework/shared"],"vef-components":["@vef-framework/components"],"vef-hooks":["@vef-framework/hooks"],"vef-core":["@vef-framework/core"],"vef-starter":["@vef-framework/starter"],"vef-intellisense-code-editor":["monaco-editor","@monaco-editor/react"],"vef-code-editor":["@uiw/react-codemirror","@uiw/codemirror-extensions-langs","@uiw/codemirror-theme-material","codemirror-json-schema","codemirror-json5","@codemirror/state","@codemirror/view","@codemirror/lint","@codemirror/language","@codemirror/lang-yaml","@codemirror/lang-json"]}}}},server:{port:s||e.DEFAULT_SERVER_PORT,host:!0,open:!0,proxy:c}}}}}exports.createConventionalConfigPlugin=u;
|
package/cjs/plugin-eslint.cjs
CHANGED
|
@@ -1,23 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var eslint = require('vite-plugin-eslint2');
|
|
5
|
-
|
|
6
|
-
"use strict";
|
|
7
|
-
function createEslintPlugin() {
|
|
8
|
-
return eslint({
|
|
9
|
-
fix: true,
|
|
10
|
-
test: false,
|
|
11
|
-
dev: true,
|
|
12
|
-
build: false,
|
|
13
|
-
cache: true,
|
|
14
|
-
cacheLocation: "node_modules/.cache/.eslintcache",
|
|
15
|
-
include: ["*.{js,ts,json,jsonc,yaml,toml,md}", "src/**/*.{ts,tsx,json,jsonc,yaml,toml,md}"],
|
|
16
|
-
exclude: ["node_modules", "virtual:", "vef:"],
|
|
17
|
-
emitError: true,
|
|
18
|
-
emitWarning: true,
|
|
19
|
-
emitWarningAsError: true
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
exports.createEslintPlugin = createEslintPlugin;
|
|
2
|
+
"use strict";var e=require("vite-plugin-eslint2");function t(){return e({fix:!0,test:!1,dev:!0,build:!1,cache:!0,cacheLocation:"node_modules/.cache/.eslintcache",include:["*.{js,ts,json,jsonc,yaml,toml,md}","src/**/*.{ts,tsx,json,jsonc,yaml,toml,md}"],exclude:["node_modules","virtual:","vef:"],emitError:!0,emitWarning:!0,emitWarningAsError:!0})}exports.createEslintPlugin=t;
|
package/cjs/plugin-html.cjs
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var htmlMinifierTerser = require('html-minifier-terser');
|
|
5
|
-
|
|
6
|
-
"use strict";
|
|
7
|
-
const virtualModuleId = "index.html";
|
|
8
|
-
const htmlContent = `
|
|
2
|
+
"use strict";var s=require("html-minifier-terser");const r="index.html",i=`
|
|
9
3
|
<!doctype html>
|
|
10
4
|
<html lang="en">
|
|
11
5
|
<head>
|
|
@@ -20,66 +14,4 @@ const htmlContent = `
|
|
|
20
14
|
<script type="module" src="src/main.ts"><\/script>
|
|
21
15
|
</body>
|
|
22
16
|
</html>
|
|
23
|
-
`;
|
|
24
|
-
function createHtmlPlugin() {
|
|
25
|
-
return [
|
|
26
|
-
{
|
|
27
|
-
name: "vef-framework:html",
|
|
28
|
-
resolveId(source) {
|
|
29
|
-
if (source === virtualModuleId) {
|
|
30
|
-
return virtualModuleId;
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
load(id) {
|
|
34
|
-
if (id === virtualModuleId) {
|
|
35
|
-
return htmlContent;
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
transformIndexHtml: {
|
|
39
|
-
order: "pre",
|
|
40
|
-
handler: () => htmlContent
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
name: "vite-plugin-vef-framework-html-minify",
|
|
45
|
-
enforce: "post",
|
|
46
|
-
async generateBundle(_, bundles) {
|
|
47
|
-
for (const bundle of Object.values(bundles)) {
|
|
48
|
-
if (bundle.type === "asset" && typeof bundle.source === "string" && bundle.fileName === virtualModuleId) {
|
|
49
|
-
bundle.source = await htmlMinifierTerser.minify(
|
|
50
|
-
bundle.source,
|
|
51
|
-
{
|
|
52
|
-
collapseBooleanAttributes: true,
|
|
53
|
-
collapseInlineTagWhitespace: true,
|
|
54
|
-
collapseWhitespace: true,
|
|
55
|
-
conservativeCollapse: false,
|
|
56
|
-
keepClosingSlash: true,
|
|
57
|
-
minifyCSS: true,
|
|
58
|
-
minifyJS: true,
|
|
59
|
-
minifyURLs: true,
|
|
60
|
-
noNewlinesBeforeTagClose: true,
|
|
61
|
-
quoteCharacter: `"`,
|
|
62
|
-
removeAttributeQuotes: false,
|
|
63
|
-
removeComments: true,
|
|
64
|
-
removeEmptyAttributes: true,
|
|
65
|
-
removeOptionalTags: false,
|
|
66
|
-
removeRedundantAttributes: true,
|
|
67
|
-
removeScriptTypeAttributes: false,
|
|
68
|
-
removeTagWhitespace: false,
|
|
69
|
-
removeEmptyElements: false,
|
|
70
|
-
removeStyleLinkTypeAttributes: false,
|
|
71
|
-
sortAttributes: true,
|
|
72
|
-
sortClassName: true,
|
|
73
|
-
trimCustomFragments: true,
|
|
74
|
-
useShortDoctype: true,
|
|
75
|
-
html5: true
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
];
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
exports.createHtmlPlugin = createHtmlPlugin;
|
|
17
|
+
`;function n(){return[{name:"vef-framework:html",resolveId(t){if(t===r)return r},load(t){if(t===r)return i},transformIndexHtml:{order:"pre",handler:()=>i}},{name:"vite-plugin-vef-framework-html-minify",enforce:"post",async generateBundle(t,o){for(const e of Object.values(o))e.type==="asset"&&typeof e.source=="string"&&e.fileName===r&&(e.source=await s.minify(e.source,{collapseBooleanAttributes:!0,collapseInlineTagWhitespace:!0,collapseWhitespace:!0,conservativeCollapse:!1,keepClosingSlash:!0,minifyCSS:!0,minifyJS:!0,minifyURLs:!0,noNewlinesBeforeTagClose:!0,quoteCharacter:'"',removeAttributeQuotes:!1,removeComments:!0,removeEmptyAttributes:!0,removeOptionalTags:!1,removeRedundantAttributes:!0,removeScriptTypeAttributes:!1,removeTagWhitespace:!1,removeEmptyElements:!1,removeStyleLinkTypeAttributes:!1,sortAttributes:!0,sortClassName:!0,trimCustomFragments:!0,useShortDoctype:!0,html5:!0}))}}]}exports.createHtmlPlugin=n;
|
package/cjs/plugin-icons.cjs
CHANGED
|
@@ -1,21 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var node_path = require('node:path');
|
|
5
|
-
var node_url = require('node:url');
|
|
6
|
-
var icons = require('unplugin-icons/vite');
|
|
7
|
-
|
|
8
|
-
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
9
|
-
"use strict";
|
|
10
|
-
function createIconsPlugin(projectDir) {
|
|
11
|
-
return icons({
|
|
12
|
-
autoInstall: false,
|
|
13
|
-
compiler: "jsx",
|
|
14
|
-
jsx: "react",
|
|
15
|
-
defaultClass: "inline-block",
|
|
16
|
-
scale: 1.2,
|
|
17
|
-
collectionsNodeResolvePath: [projectDir, node_path.resolve(node_path.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('plugin-icons.cjs', document.baseURI).href)))), "..")]
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
exports.createIconsPlugin = createIconsPlugin;
|
|
2
|
+
"use strict";var r=require("node:path"),t=require("node:url"),c=require("unplugin-icons/vite"),e=typeof document<"u"?document.currentScript:null;function o(n){return c({autoInstall:!1,compiler:"jsx",jsx:"react",defaultClass:"inline-block",scale:1.2,collectionsNodeResolvePath:[n,r.resolve(r.dirname(t.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:e&&e.tagName.toUpperCase()==="SCRIPT"&&e.src||new URL("plugin-icons.cjs",document.baseURI).href)),"..")]})}exports.createIconsPlugin=o;
|