notform-nuxt 1.0.0-alpha.2 → 1.0.0-alpha.3
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/dist/module.d.mts +16 -5
- package/dist/module.json +4 -1
- package/dist/module.mjs +38 -4
- package/dist/types.d.mts +7 -1
- package/package.json +7 -5
- package/dist/runtime/server/tsconfig.json +0 -3
package/dist/module.d.mts
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { NuxtModule } from '@nuxt/schema';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/** Nuxt module options for `notform` */
|
|
4
|
+
interface NotFormModuleOptions {
|
|
5
|
+
/** Enable auto imports for components and composables */
|
|
6
|
+
autoImport?: boolean;
|
|
5
7
|
}
|
|
6
|
-
declare const
|
|
8
|
+
declare const _default: NuxtModule<NotFormModuleOptions>;
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
declare module '@nuxt/schema' {
|
|
11
|
+
interface NuxtConfig {
|
|
12
|
+
notform?: NotFormModuleOptions;
|
|
13
|
+
}
|
|
14
|
+
interface NuxtOptions {
|
|
15
|
+
notform?: NotFormModuleOptions;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { _default as default };
|
|
20
|
+
export type { NotFormModuleOptions };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,13 +1,47 @@
|
|
|
1
|
-
import { defineNuxtModule } from '@nuxt/kit';
|
|
1
|
+
import { defineNuxtModule, addComponent, addImports } from '@nuxt/kit';
|
|
2
2
|
|
|
3
|
+
const components = [
|
|
4
|
+
"NotForm",
|
|
5
|
+
"NotField",
|
|
6
|
+
"NotArrayField",
|
|
7
|
+
"NotMessage"
|
|
8
|
+
];
|
|
9
|
+
const composables = [
|
|
10
|
+
"useNotForm"
|
|
11
|
+
];
|
|
3
12
|
const module$1 = defineNuxtModule({
|
|
4
13
|
meta: {
|
|
5
14
|
name: "notform-nuxt",
|
|
6
|
-
configKey: "notform"
|
|
15
|
+
configKey: "notform",
|
|
16
|
+
compatibility: {
|
|
17
|
+
nuxt: ">=4.0.0"
|
|
18
|
+
}
|
|
7
19
|
},
|
|
8
20
|
// Default configuration options of the Nuxt module
|
|
9
|
-
defaults: {
|
|
10
|
-
|
|
21
|
+
defaults: {
|
|
22
|
+
autoImport: true
|
|
23
|
+
},
|
|
24
|
+
// Module factory
|
|
25
|
+
setup(options, nuxt) {
|
|
26
|
+
nuxt.options.vite.optimizeDeps = nuxt.options.vite.optimizeDeps || {};
|
|
27
|
+
nuxt.options.vite.optimizeDeps.exclude = nuxt.options.vite.optimizeDeps.exclude || [];
|
|
28
|
+
nuxt.options.vite.optimizeDeps.exclude.push("notform");
|
|
29
|
+
if (options.autoImport) {
|
|
30
|
+
components.forEach((component) => {
|
|
31
|
+
addComponent({
|
|
32
|
+
name: component,
|
|
33
|
+
export: component,
|
|
34
|
+
filePath: "notform"
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
composables.forEach((composable) => {
|
|
38
|
+
addImports({
|
|
39
|
+
name: composable,
|
|
40
|
+
as: composable,
|
|
41
|
+
from: "notform"
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
}
|
|
11
45
|
}
|
|
12
46
|
});
|
|
13
47
|
|
package/dist/types.d.mts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
+
|
|
3
|
+
import type { default as Module } from './module.mjs'
|
|
4
|
+
|
|
5
|
+
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
+
|
|
1
7
|
export { default } from './module.mjs'
|
|
2
8
|
|
|
3
|
-
export { type
|
|
9
|
+
export { type NotFormModuleOptions } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "notform-nuxt",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
|
-
"description": "Effortless Vue Forms Validation",
|
|
9
|
+
"description": "Official notform nuxt module - Effortless Vue Forms Validation",
|
|
10
10
|
"author": "Favour Emeka <favorodera@gmail.com>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"homepage": "https://notform-docs.vercel.app/",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"main": "./dist/module.mjs",
|
|
27
|
+
"types": "./dist/types.d.mts",
|
|
27
28
|
"typesVersions": {
|
|
28
29
|
"*": {
|
|
29
30
|
".": [
|
|
@@ -35,7 +36,8 @@
|
|
|
35
36
|
"dist"
|
|
36
37
|
],
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"@nuxt/kit": "^4.3.0"
|
|
39
|
+
"@nuxt/kit": "^4.3.0",
|
|
40
|
+
"notform": "1.0.0-alpha.6"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|
|
41
43
|
"@nuxt/devtools": "^3.1.1",
|
|
@@ -47,7 +49,6 @@
|
|
|
47
49
|
"@types/node": "latest",
|
|
48
50
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
49
51
|
"@vitejs/plugin-vue-jsx": "^5.1.3",
|
|
50
|
-
"changelogen": "^0.6.2",
|
|
51
52
|
"eslint": "^9.39.2",
|
|
52
53
|
"nitropack": "^2.13.1",
|
|
53
54
|
"nuxt": "^4.3.0",
|
|
@@ -71,6 +72,7 @@
|
|
|
71
72
|
"build": "nuxt-module-build build",
|
|
72
73
|
"dev": "nuxt-module-build build --stub && nuxt-module-build prepare",
|
|
73
74
|
"lint": "eslint . --fix",
|
|
74
|
-
"typecheck": "vue-tsc --noEmit"
|
|
75
|
+
"typecheck": "vue-tsc --noEmit",
|
|
76
|
+
"cleanup": "rm -rf dist node_modules .turbo .nuxt"
|
|
75
77
|
}
|
|
76
78
|
}
|