notform-nuxt 2.0.0-alpha.6 → 2.0.0-alpha.8
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/README.md +10 -78
- package/dist/module.json +4 -1
- package/dist/module.mjs +52 -7
- package/dist/runtime/components.d.ts +1 -0
- package/dist/runtime/components.js +1 -0
- package/dist/runtime/composables.d.ts +1 -0
- package/dist/runtime/composables.js +1 -0
- package/package.json +6 -5
- package/dist/runtime/plugin.d.ts +0 -2
- package/dist/runtime/plugin.js +0 -4
- package/dist/runtime/server/tsconfig.json +0 -3
package/README.md
CHANGED
|
@@ -1,84 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
Get your module up and running quickly.
|
|
1
|
+
# notform-nuxt
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-->
|
|
3
|
+
[](https://www.npmjs.com/package/notform-nuxt)
|
|
4
|
+
[](https://www.npmjs.com/package/notform-nuxt)
|
|
5
|
+
[](https://github.com/favorodera/notform/blob/main/LICENSE)
|
|
6
|
+
[](https://bundlephobia.com/package/notform-nuxt)
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
**Official Nuxt module for NotForm - Vue Forms Without the Friction.**
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
14
|
-
[![License][license-src]][license-href]
|
|
15
|
-
[![Nuxt][nuxt-src]][nuxt-href]
|
|
10
|
+
`notform-nuxt` provides seamless integration for NotForm in Nuxt applications, including auto-imports and Nuxt-specific optimizations.
|
|
16
11
|
|
|
17
|
-
|
|
12
|
+
## Documentation
|
|
18
13
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<!-- - [📖 Documentation](https://example.com) -->
|
|
14
|
+
For detailed guides, API reference, and examples, visit:
|
|
15
|
+
**[notform-docs.vercel.app](https://notformdocs.vercel.app/getting-started/nuxt-module)**
|
|
22
16
|
|
|
23
|
-
## Features
|
|
24
|
-
|
|
25
|
-
<!-- Highlight some of the features your module provide here -->
|
|
26
|
-
- ⛰ Foo
|
|
27
|
-
- 🚠 Bar
|
|
28
|
-
- 🌲 Baz
|
|
29
|
-
|
|
30
|
-
## Quick Setup
|
|
31
|
-
|
|
32
|
-
Install the module to your Nuxt application with one command:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npx nuxt module add my-module
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
That's it! You can now use My Module in your Nuxt app ✨
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
## Contribution
|
|
42
|
-
|
|
43
|
-
<details>
|
|
44
|
-
<summary>Local development</summary>
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
# Install dependencies
|
|
48
|
-
npm install
|
|
49
|
-
|
|
50
|
-
# Generate type stubs
|
|
51
|
-
npm run dev:prepare
|
|
52
|
-
|
|
53
|
-
# Develop with the playground
|
|
54
|
-
npm run dev
|
|
55
|
-
|
|
56
|
-
# Build the playground
|
|
57
|
-
npm run dev:build
|
|
58
|
-
|
|
59
|
-
# Run ESLint
|
|
60
|
-
npm run lint
|
|
61
|
-
|
|
62
|
-
# Run Vitest
|
|
63
|
-
npm run test
|
|
64
|
-
npm run test:watch
|
|
65
|
-
|
|
66
|
-
# Release new version
|
|
67
|
-
npm run release
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
</details>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<!-- Badges -->
|
|
74
|
-
[npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
|
75
|
-
[npm-version-href]: https://npmjs.com/package/my-module
|
|
76
|
-
|
|
77
|
-
[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
78
|
-
[npm-downloads-href]: https://npm.chart.dev/my-module
|
|
79
|
-
|
|
80
|
-
[license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
81
|
-
[license-href]: https://npmjs.com/package/my-module
|
|
82
|
-
|
|
83
|
-
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt
|
|
84
|
-
[nuxt-href]: https://nuxt.com
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,15 +1,60 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver,
|
|
1
|
+
import { defineNuxtModule, createResolver, addComponent, addImports, addTemplate, addTypeTemplate } 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
|
-
//
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
20
|
+
// Module factory
|
|
21
|
+
setup(_options, nuxt) {
|
|
22
|
+
const { resolve } = createResolver(import.meta.url);
|
|
23
|
+
const componentsRuntime = resolve("./runtime/components");
|
|
24
|
+
const composablesRuntime = resolve("./runtime/composables");
|
|
25
|
+
nuxt.options.vite.optimizeDeps = nuxt.options.vite.optimizeDeps ||= {};
|
|
26
|
+
nuxt.options.vite.optimizeDeps.exclude = nuxt.options.vite.optimizeDeps.exclude ||= [];
|
|
27
|
+
if (!nuxt.options.vite.optimizeDeps.exclude.includes("notform")) {
|
|
28
|
+
nuxt.options.vite.optimizeDeps.exclude.push("notform");
|
|
29
|
+
}
|
|
30
|
+
components.forEach((name) => {
|
|
31
|
+
addComponent({
|
|
32
|
+
name,
|
|
33
|
+
export: name,
|
|
34
|
+
filePath: componentsRuntime
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
composables.forEach((composable) => {
|
|
38
|
+
addImports({
|
|
39
|
+
name: composable,
|
|
40
|
+
as: composable,
|
|
41
|
+
from: composablesRuntime
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
const template = addTemplate({
|
|
45
|
+
filename: "notform.mjs",
|
|
46
|
+
getContents: () => "export * from 'notform'",
|
|
47
|
+
write: true
|
|
48
|
+
});
|
|
49
|
+
nuxt.options.alias["#notform"] = template.dst;
|
|
50
|
+
addTypeTemplate({
|
|
51
|
+
filename: "types/notform.d.ts",
|
|
52
|
+
getContents: () => `
|
|
53
|
+
declare module '#notform' {
|
|
54
|
+
export type * from 'notform'
|
|
55
|
+
}
|
|
56
|
+
`
|
|
57
|
+
});
|
|
13
58
|
}
|
|
14
59
|
});
|
|
15
60
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NotForm, NotField, NotArrayField, NotMessage } from 'notform';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NotForm, NotField, NotArrayField, NotMessage } from "notform";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useNotForm } from 'notform';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useNotForm } from "notform";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "notform-nuxt",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"description": "Official notform nuxt module - Vue Forms Without the Friction",
|
|
10
10
|
"author": "Favour Emeka <favorodera@gmail.com>",
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"homepage": "https://
|
|
12
|
+
"homepage": "https://notformdocs.vercel.app/",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git+https://github.com/favorodera/notform.git"
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@nuxt/kit": "^4.4.2"
|
|
38
|
+
"@nuxt/kit": "^4.4.2",
|
|
39
|
+
"notform": "2.0.0-alpha.8"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@nuxt/module-builder": "^1.0.2",
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
"vue-tsc": "^3.2.6"
|
|
45
46
|
},
|
|
46
47
|
"engines": {
|
|
47
|
-
"node": ">=
|
|
48
|
+
"node": ">=22.0.0"
|
|
48
49
|
},
|
|
49
50
|
"keywords": [
|
|
50
51
|
"notform-nuxt",
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
"scripts": {
|
|
58
59
|
"dev": "nuxt prepare && nuxt-module-build build --stub",
|
|
59
60
|
"build": "nuxt prepare && nuxt-module-build build",
|
|
60
|
-
"typecheck": "vue-tsc --noEmit",
|
|
61
|
+
"typecheck": "nuxt prepare && vue-tsc --noEmit",
|
|
61
62
|
"lint": "eslint . --fix"
|
|
62
63
|
}
|
|
63
64
|
}
|
package/dist/runtime/plugin.d.ts
DELETED
package/dist/runtime/plugin.js
DELETED