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 +12 -0
- package/.eslintrc.cjs +4 -0
- package/.nuxtrc +1 -0
- package/.playground/app.config.ts +5 -0
- package/.playground/nuxt.config.ts +3 -0
- package/README.md +73 -0
- package/app.config.ts +14 -0
- package/app.vue +3 -0
- package/components/HelloWorld.vue +14 -0
- package/components/forms/input-text/InputText.vue +16 -0
- package/nuxt.config.ts +10 -0
- package/package.json +20 -0
- package/tsconfig.json +3 -0
package/.editorconfig
ADDED
package/.eslintrc.cjs
ADDED
package/.nuxtrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
typescript.includeWorkspace = true
|
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
package/app.vue
ADDED
|
@@ -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
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