srcdev-nuxt-forms 0.0.1

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/.editorconfig ADDED
@@ -0,0 +1,12 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_size = 2
5
+ indent_style = space
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [*.md]
12
+ trim_trailing_whitespace = false
package/.eslintrc.cjs ADDED
@@ -0,0 +1,4 @@
1
+ module.exports = {
2
+ root: true,
3
+ extends: ["@nuxt/eslint-config"],
4
+ };
package/.nuxtrc ADDED
@@ -0,0 +1 @@
1
+ typescript.includeWorkspace = true
@@ -0,0 +1,5 @@
1
+ export default defineAppConfig({
2
+ myLayer: {
3
+ name: 'My amazing Nuxt layer (overwritten)'
4
+ }
5
+ })
@@ -0,0 +1,3 @@
1
+ export default defineNuxtConfig({
2
+ extends: ['..']
3
+ })
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # Nuxt Layer Starter
2
+
3
+ Create Nuxt extendable layer with this GitHub template.
4
+
5
+ ## Setup
6
+
7
+ Make sure to install the dependencies:
8
+
9
+ ```bash
10
+ pnpm install
11
+ ```
12
+
13
+ ## Working on your theme
14
+
15
+ Your theme is at the root of this repository, it is exactly like a regular Nuxt project, except you can publish it on NPM.
16
+
17
+ The `.playground` directory should help you on trying your theme during development.
18
+
19
+ Running `pnpm dev` will prepare and boot `.playground` directory, which imports your theme itself.
20
+
21
+ ## Distributing your theme
22
+
23
+ Your Nuxt layer is shaped exactly the same as any other Nuxt project, except you can publish it on NPM.
24
+
25
+ To do so, you only have to check if `files` in `package.json` are valid, then run:
26
+
27
+ ```bash
28
+ npm publish --access public
29
+ ```
30
+
31
+ Once done, your users will only have to run:
32
+
33
+ ```bash
34
+ npm install --save your-theme
35
+ ```
36
+
37
+ Then add the dependency to their `extends` in `nuxt.config`:
38
+
39
+ ```ts
40
+ defineNuxtConfig({
41
+ extends: 'your-theme'
42
+ })
43
+ ```
44
+
45
+ ## Development Server
46
+
47
+ Start the development server on http://localhost:3000
48
+
49
+ ```bash
50
+ pnpm dev
51
+ ```
52
+
53
+ ## Production
54
+
55
+ Build the application for production:
56
+
57
+ ```bash
58
+ pnpm build
59
+ ```
60
+
61
+ Or statically generate it with:
62
+
63
+ ```bash
64
+ pnpm generate
65
+ ```
66
+
67
+ Locally preview production build:
68
+
69
+ ```bash
70
+ pnpm preview
71
+ ```
72
+
73
+ Checkout the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
package/app.config.ts ADDED
@@ -0,0 +1,14 @@
1
+ export default defineAppConfig({
2
+ myLayer: {
3
+ name: 'Hello from Nuxt layer'
4
+ }
5
+ })
6
+
7
+ declare module '@nuxt/schema' {
8
+ interface AppConfigInput {
9
+ myLayer?: {
10
+ /** Project name */
11
+ name?: string
12
+ }
13
+ }
14
+ }
package/app.vue ADDED
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <HelloWorld />
3
+ </template>
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <div>
3
+ <h1>Hello World!</h1>
4
+ <pre>{{ myLayer }}</pre>
5
+ <div>
6
+ <InputText />
7
+ </div>
8
+ </div>
9
+ </template>
10
+
11
+ <script setup lang="ts">
12
+ const { myLayer } = useAppConfig()
13
+ </script>
14
+
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <div>
3
+ <input type="text" class="input-text" />
4
+ </div>
5
+ </template>
6
+
7
+ <script lang="ts" setup>
8
+ console.log('InputText Loaded');
9
+ </script>
10
+
11
+ <style lang="css" scoped>
12
+ .input-text {
13
+ border: 1px solid #ccc;
14
+ padding: 10px;
15
+ }
16
+ </style>
package/nuxt.config.ts ADDED
@@ -0,0 +1,10 @@
1
+ // https://nuxt.com/docs/api/configuration/nuxt-config
2
+ export default defineNuxtConfig({
3
+ devtools: { enabled: true },
4
+ components: [
5
+ {
6
+ path: "~/components",
7
+ pathPrefix: false
8
+ }
9
+ ],
10
+ })
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "srcdev-nuxt-forms",
3
+ "type": "module",
4
+ "version": "0.0.1",
5
+ "main": "./nuxt.config.ts",
6
+ "scripts": {
7
+ "dev": "nuxi dev .playground",
8
+ "build": "nuxt build .playground",
9
+ "generate": "nuxt generate .playground",
10
+ "preview": "nuxt preview .playground",
11
+ "lint": "eslint .",
12
+ "postinstall": "nuxt prepare .playground"
13
+ },
14
+ "devDependencies": {
15
+ "@nuxt/eslint-config": "^0.3.13",
16
+ "eslint": "^9.5.0",
17
+ "nuxt": "^3.12.2",
18
+ "typescript": "^5.5.2"
19
+ }
20
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "./.playground/.nuxt/tsconfig.json"
3
+ }