@keyblade/vite-plugin-vue-pro 1.0.0

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/es/index.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ import { Options } from "@vitejs/plugin-vue";
2
+ import { VitePluginVueDevToolsOptions } from "vite-plugin-vue-devtools";
3
+ import { visualizer } from "rollup-plugin-visualizer";
4
+ import { PluginOption } from "vite";
5
+
6
+ //#region src/index.d.ts
7
+ declare function framework(options?: {
8
+ /** vue 配置 */
9
+ vue?: Options;
10
+ /** vueJsx 配置 */
11
+ vueJsx?: VueJsxOptions;
12
+ /** vue开发者工具 配置 */
13
+ vueDevTools?: VitePluginVueDevToolsOptions;
14
+ /** 打包分析 配置 */
15
+ visualizer?: Parameters<typeof visualizer>[0];
16
+ }): PluginOption[];
17
+ //#endregion
18
+ export { framework as default };
package/es/index.js ADDED
@@ -0,0 +1,31 @@
1
+ import vue from "@vitejs/plugin-vue";
2
+ import vueJsx from "@vitejs/plugin-vue-jsx";
3
+ import VueDevTools from "vite-plugin-vue-devtools";
4
+ import { monitorUsage } from "@foundbyte/security-monitor-usage";
5
+ import { visualizer } from "rollup-plugin-visualizer";
6
+
7
+ //#region src/index.ts
8
+ /**
9
+ * 安全监控插件
10
+ */
11
+ function securityMonitorPlugin() {
12
+ return {
13
+ name: "keyblade-pro-security-monitor",
14
+ enforce: "post",
15
+ async buildStart() {
16
+ await monitorUsage("未知");
17
+ }
18
+ };
19
+ }
20
+ function framework(options) {
21
+ return [
22
+ vue(options?.vue),
23
+ vueJsx(options?.vue),
24
+ VueDevTools(options?.vueDevTools),
25
+ visualizer(),
26
+ securityMonitorPlugin()
27
+ ];
28
+ }
29
+
30
+ //#endregion
31
+ export { framework as default };
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@keyblade/vite-plugin-vue-pro",
3
+ "description": "KeyBlade Vite Plugin Vue Pro",
4
+ "author": "yangshuai <704807396@qq.com>",
5
+ "version": "1.0.0",
6
+ "private": false,
7
+ "type": "module",
8
+ "main": "es/index.js",
9
+ "module": "es/index.js",
10
+ "files": [
11
+ "es",
12
+ "package.json",
13
+ "README.md"
14
+ ],
15
+ "publishConfig": {
16
+ "registry": "https://registry.npmjs.org/",
17
+ "access": "public"
18
+ },
19
+ "sideEffects": false,
20
+ "dependencies": {
21
+ "@foundbyte/security-monitor-usage": "^1.0.1",
22
+ "@vitejs/plugin-vue": "^6.0.1",
23
+ "@vitejs/plugin-vue-jsx": "^5.1.1",
24
+ "rollup-plugin-visualizer": "^6.0.3",
25
+ "vite-plugin-vue-devtools": "^8.0.1"
26
+ },
27
+ "peerDependencies": {
28
+ "vite": ">=6.0.0"
29
+ },
30
+ "scripts": {
31
+ "build": "tsdown",
32
+ "publish:npm": "pnpm publish"
33
+ },
34
+ "typings": "es/index.d.ts"
35
+ }