Skip to content

Commit 6cac235

Browse files
committed
initial nuxt template
0 parents  commit 6cac235

21 files changed

+11226
-0
lines changed

.cspell.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"version": "0.2",
3+
"import": ["@cspell/dict-de-de/cspell-ext.json"],
4+
"language": "en",
5+
"ignorePaths": [
6+
"pnpm-lock.yml",
7+
".vscode/settings.json",
8+
".cspell.json",
9+
".nuxt",
10+
"pnpm-lock.yaml"
11+
],
12+
"words": [
13+
"dprint",
14+
"geprog",
15+
"nuxt",
16+
"nuxtjs"
17+
],
18+
"overrides": [
19+
{
20+
"filename": ["i18n/locales/de.json"],
21+
"language": "de,en",
22+
"words": [
23+
]
24+
}
25+
]
26+
}

.github/workflows/tests.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Tests
2+
3+
on: push
4+
5+
jobs:
6+
lint:
7+
name: Lint
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-node@v4
12+
with:
13+
node-version: 22
14+
- uses: pnpm/action-setup@v4
15+
with:
16+
version: 9
17+
run_install: true
18+
- run: pnpm lint
19+
20+
typecheck:
21+
name: Typecheck
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 22
28+
- uses: pnpm/action-setup@v4
29+
with:
30+
version: 9
31+
run_install: true
32+
- run: pnpm typecheck
33+
34+
spelling:
35+
name: Typecheck
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
- uses: actions/setup-node@v4
40+
with:
41+
node-version: 22
42+
- uses: pnpm/action-setup@v4
43+
with:
44+
version: 9
45+
run_install: true
46+
- run: pnpm spelling

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Nuxt dev/build outputs
2+
.output
3+
.data
4+
.nuxt
5+
.nitro
6+
.cache
7+
dist
8+
9+
# Node dependencies
10+
node_modules
11+
12+
# Logs
13+
logs
14+
*.log
15+
16+
# Misc
17+
.DS_Store
18+
.fleet
19+
.idea
20+
21+
# Local env files
22+
.env
23+
.env.*
24+
!.env.example

.vscode/settings.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
// ########## START - eslint formatting options (https://github.com/antfu/eslint-config?tab=readme-ov-file#ide-support-auto-fix-on-save) ##############
3+
// Disable the default formatter, use eslint instead
4+
"prettier.enable": false,
5+
"editor.formatOnSave": false,
6+
7+
// Auto fix
8+
"editor.codeActionsOnSave": {
9+
"source.fixAll.eslint": "explicit",
10+
"source.organizeImports": "never"
11+
},
12+
13+
// Enable eslint for all supported languages
14+
"eslint.validate": [
15+
"javascript",
16+
"javascriptreact",
17+
"typescript",
18+
"typescriptreact",
19+
"vue",
20+
"html",
21+
"markdown",
22+
"json",
23+
"jsonc",
24+
"yaml",
25+
"toml",
26+
"xml",
27+
"gql",
28+
"graphql",
29+
"astro",
30+
"svelte",
31+
"css",
32+
"less",
33+
"scss",
34+
"pcss",
35+
"postcss"
36+
],
37+
// ########## END - eslint formatting options ###############
38+
39+
// further configs
40+
"editor.inlineSuggest.enabled": true,
41+
"files.associations": {
42+
"*.css": "tailwindcss"
43+
},
44+
"editor.quickSuggestions": {
45+
"strings": true
46+
},
47+
"i18n-ally.localesPaths": [
48+
"i18n",
49+
"i18n/locales"
50+
]
51+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 GEPROG GmbH
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Nuxt Template
2+
3+
This template is an extension of the default nuxt starter template.
4+
It enriches it with
5+
6+
- Nuxt UI (with some minimal default)
7+
- i18n
8+
- spellchecking
9+
- eslint config
10+
- typechecking
11+
12+
It uses `pnpm` as package manager.
13+
`SSR` is deactivated.
14+
15+
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

app.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export default defineAppConfig({
2+
nuxtIcon: {
3+
size: '24px',
4+
},
5+
ui: {
6+
button: {
7+
default: {
8+
size: 'md',
9+
},
10+
},
11+
},
12+
});

app.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<template>
2+
<NuxtLayout>
3+
<NuxtPage />
4+
<UNotifications />
5+
</NuxtLayout>
6+
</template>
7+
8+
<script setup lang="ts">
9+
const toast = useToast();
10+
const { t } = useI18n();
11+
onErrorCaptured((error) => {
12+
console.error(error);
13+
toast.add({
14+
title: t('error_occurred'),
15+
description: error.message,
16+
color: 'red',
17+
});
18+
});
19+
</script>

eslint.config.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import antfu from '@antfu/eslint-config';
2+
3+
export default antfu({
4+
vue: true,
5+
typescript: true,
6+
formatters: {
7+
/**
8+
* Format CSS, LESS, SCSS files, also the `<style>` blocks in Vue
9+
* By default uses Prettier
10+
*/
11+
css: true,
12+
/**
13+
* Format HTML files
14+
* By default uses Prettier
15+
*/
16+
html: true,
17+
/**
18+
* Format Markdown files
19+
* Supports Prettier and dprint
20+
* By default uses Prettier
21+
*/
22+
markdown: 'prettier',
23+
},
24+
rules: {
25+
'style/semi': ['error', 'always'],
26+
'vue/block-order': ['error', {
27+
order: [['template', 'script'], 'style'],
28+
}],
29+
},
30+
});

i18n/locales/de.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"start_page": "Startseite"
3+
}

0 commit comments

Comments
 (0)