@effect-app/vue 2.80.3-next.5 → 2.80.3-next.6
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/CHANGELOG.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formInputVitePlugin.d.ts","sourceRoot":"","sources":["../src/formInputVitePlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAIlC,wBAAgB,mBAAmB,IAAI,MAAM,CAc5C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// to use: import { formInputVitePlugin } from '@effect-app/vue/vite-plugin' and add it to the vite plugins
|
|
2
|
+
export function formInputVitePlugin() {
|
|
3
|
+
return {
|
|
4
|
+
name: "form-input-vite-plugin",
|
|
5
|
+
transform(code, id) {
|
|
6
|
+
if (id.endsWith(".vue")) {
|
|
7
|
+
const transformedCode = code.replace(/<form\.Input\b/g, "<component :is=\"form.Input\"");
|
|
8
|
+
return transformedCode !== code ? transformedCode : null;
|
|
9
|
+
}
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybUlucHV0Vml0ZVBsdWdpbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9mb3JtSW5wdXRWaXRlUGx1Z2luLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLDJHQUEyRztBQUUzRyxNQUFNLFVBQVUsbUJBQW1CO0lBQ2pDLE9BQU87UUFDTCxJQUFJLEVBQUUsd0JBQXdCO1FBQzlCLFNBQVMsQ0FBQyxJQUFZLEVBQUUsRUFBVTtZQUNoQyxJQUFJLEVBQUUsQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztnQkFDeEIsTUFBTSxlQUFlLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FDbEMsaUJBQWlCLEVBQ2pCLCtCQUErQixDQUNoQyxDQUFBO2dCQUNELE9BQU8sZUFBZSxLQUFLLElBQUksQ0FBQyxDQUFDLENBQUMsZUFBZSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUE7WUFDMUQsQ0FBQztZQUNELE9BQU8sSUFBSSxDQUFBO1FBQ2IsQ0FBQztLQUNGLENBQUE7QUFDSCxDQUFDIn0=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/vue",
|
|
3
|
-
"version": "2.80.3-next.
|
|
3
|
+
"version": "2.80.3-next.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/effect-ts-app/libs/tree/main/packages/vue",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"types": "./dist/form.d.ts",
|
|
79
79
|
"default": "./dist/form.js"
|
|
80
80
|
},
|
|
81
|
+
"./formInputVitePlugin": {
|
|
82
|
+
"types": "./dist/formInputVitePlugin.d.ts",
|
|
83
|
+
"default": "./dist/formInputVitePlugin.js"
|
|
84
|
+
},
|
|
81
85
|
"./lib": {
|
|
82
86
|
"types": "./dist/lib.d.ts",
|
|
83
87
|
"default": "./dist/lib.js"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Plugin } from "vite"
|
|
2
|
+
|
|
3
|
+
// to use: import { formInputVitePlugin } from '@effect-app/vue/vite-plugin' and add it to the vite plugins
|
|
4
|
+
|
|
5
|
+
export function formInputVitePlugin(): Plugin {
|
|
6
|
+
return {
|
|
7
|
+
name: "form-input-vite-plugin",
|
|
8
|
+
transform(code: string, id: string) {
|
|
9
|
+
if (id.endsWith(".vue")) {
|
|
10
|
+
const transformedCode = code.replace(
|
|
11
|
+
/<form\.Input\b/g,
|
|
12
|
+
"<component :is=\"form.Input\""
|
|
13
|
+
)
|
|
14
|
+
return transformedCode !== code ? transformedCode : null
|
|
15
|
+
}
|
|
16
|
+
return null
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|