Skip to content

Commit 2076072

Browse files
committed
feat: ⬆️ upgrade deps for nuxt templates
1 parent d606edf commit 2076072

File tree

22 files changed

+223
-158
lines changed

22 files changed

+223
-158
lines changed

template-nuxt3-ts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Génère le code de production de l’application :
2525
npm run build
2626
```
2727

28-
Locally preview production build:
28+
Prévisualisation du code de prod (nécessite un build préalable) :
2929

3030
```bash
3131
npm run preview

template-nuxt3-ts/_gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,7 @@ $RECYCLE.BIN/
348348
*.lnk
349349

350350
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,node,windows,macos,linux,intellij
351-
.eslintrc-auto-import.json
352-
auto-imports.d.ts
351+
353352

354353
/cypress/videos/
355354
/cypress/screenshots/

template-nuxt3-ts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"devDependencies": {
2020
"@nuxt/devtools": "latest",
2121
"@nuxt/test-utils": "^3.6.1",
22-
"@nuxt/types": "^2.16.0",
23-
"@nuxt/typescript-build": "^2.1.0",
22+
"@nuxt/types": "^2.17.0",
23+
"@nuxt/typescript-build": "^3.0.1",
2424
"@nuxtjs/eslint-config-typescript": "^12.0.0",
2525
"@rushstack/eslint-patch": "^1.3.2",
2626
"@testing-library/jest-dom": "^5.16.5",

template-nuxt3/.eslintrc.cjs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
module.exports = {
22
root: true,
33
extends: [
4-
'plugin:vue/vue3-recommended',
54
'standard',
5+
'plugin:vue/vue3-recommended',
6+
'@nuxtjs/eslint-config',
67
],
7-
env: {
8-
'vue/setup-compiler-macros': true,
9-
},
10-
globals: {
11-
definePageMeta: 'readonly',
12-
defineMeta: 'readonly',
13-
ref: 'readonly',
14-
},
158
rules: {
169
'jsx-quotes': [2, 'prefer-double'],
1710
'comma-dangle': [2, 'always-multiline'],
11+
'vue/no-multiple-template-root': 'off',
12+
'vue/max-attributes-per-line': ['error', {
13+
singleline: 1,
14+
multiline: 1,
15+
}],
1816
},
1917
overrides: [
2018
{
@@ -38,6 +36,7 @@ module.exports = {
3836
{
3937
files: [
4038
'client/pages/**/*.vue',
39+
'client/layouts/**/*.vue',
4140
],
4241
rules: {
4342
'vue/multi-word-component-names': 'off',

template-nuxt3/.vscode/vue-dsfr.code-snippets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"scope": "vue",
2828
"prefix": "script setup",
2929
"body": [
30-
"<script lang=\"ts\" setup>",
3130
"<script setup>",
3231
"defineProps({",
3332
" $1",

template-nuxt3/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Gabarit de démarrage de VueDsfr pour Nuxt 3
22

3-
Nous vous recommandons de regarder la [documentation de Nuxt 3](https://v3.nuxtjs.org)
3+
Nous vous recommandons de regarder la [documentation de Nuxt 3](https://nuxt.com/docs/getting-started/introduction)
44
et la [documentation de VueDsfr](https://vue-dsfr.netlify.app).
55

66
## Installation des dépendances
77

88
```bash
9-
npm install --legacy-peer-deps
9+
npm install
1010
```
1111

1212
## Lancer nuxt en mode développement
1313

14-
Démarre le serveur sur http://localhost:3000
14+
Démarre le serveur sur `http://localhost:3000`·:
1515

1616
```bash
1717
npm run dev
@@ -25,4 +25,10 @@ Génère le code de production de l’application :
2525
npm run build
2626
```
2727

28-
Regarder ensuite la [documentation de Nuxt concernant le déploiement](https://v3.nuxtjs.org/docs/deployment).
28+
Prévisualisation du code de prod (nécessite un build préalable) :
29+
30+
```bash
31+
npm run preview
32+
```
33+
34+
Regarder ensuite la [documentation de Nuxt concernant le déploiement](https://nuxt.com/docs/getting-started/deployment).

template-nuxt3/_gitignore

Lines changed: 149 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,118 @@
1-
2-
# Created by https://www.toptal.com/developers/gitignore/api/node,windows,macos,linux,visualstudiocode
3-
# Edit at https://www.toptal.com/developers/gitignore?templates=node,windows,macos,linux,visualstudiocode
1+
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,node,windows,macos,linux,intellij
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,node,windows,macos,linux,intellij
3+
4+
### Intellij ###
5+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
6+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
7+
8+
# User-specific stuff
9+
.idea/**/workspace.xml
10+
.idea/**/tasks.xml
11+
.idea/**/usage.statistics.xml
12+
.idea/**/dictionaries
13+
.idea/**/shelf
14+
15+
# AWS User-specific
16+
.idea/**/aws.xml
17+
18+
# Generated files
19+
.idea/**/contentModel.xml
20+
21+
# Sensitive or high-churn files
22+
.idea/**/dataSources/
23+
.idea/**/dataSources.ids
24+
.idea/**/dataSources.local.xml
25+
.idea/**/sqlDataSources.xml
26+
.idea/**/dynamic.xml
27+
.idea/**/uiDesigner.xml
28+
.idea/**/dbnavigator.xml
29+
30+
# Gradle
31+
.idea/**/gradle.xml
32+
.idea/**/libraries
33+
34+
# Gradle and Maven with auto-import
35+
# When using Gradle or Maven with auto-import, you should exclude module files,
36+
# since they will be recreated, and may cause churn. Uncomment if using
37+
# auto-import.
38+
# .idea/artifacts
39+
# .idea/compiler.xml
40+
# .idea/jarRepositories.xml
41+
# .idea/modules.xml
42+
# .idea/*.iml
43+
# .idea/modules
44+
# *.iml
45+
# *.ipr
46+
47+
# CMake
48+
cmake-build-*/
49+
50+
# Mongo Explorer plugin
51+
.idea/**/mongoSettings.xml
52+
53+
# File-based project format
54+
*.iws
55+
56+
# IntelliJ
57+
out/
58+
59+
# mpeltonen/sbt-idea plugin
60+
.idea_modules/
61+
62+
# JIRA plugin
63+
atlassian-ide-plugin.xml
64+
65+
# Cursive Clojure plugin
66+
.idea/replstate.xml
67+
68+
# SonarLint plugin
69+
.idea/sonarlint/
70+
71+
# Crashlytics plugin (for Android Studio and IntelliJ)
72+
com_crashlytics_export_strings.xml
73+
crashlytics.properties
74+
crashlytics-build.properties
75+
fabric.properties
76+
77+
# Editor-based Rest Client
78+
.idea/httpRequests
79+
80+
# Android studio 3.1+ serialized cache file
81+
.idea/caches/build_file_checksums.ser
82+
83+
### Intellij Patch ###
84+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
85+
86+
# *.iml
87+
# modules.xml
88+
# .idea/misc.xml
89+
# *.ipr
90+
91+
# Sonarlint plugin
92+
# https://plugins.jetbrains.com/plugin/7973-sonarlint
93+
.idea/**/sonarlint/
94+
95+
# SonarQube Plugin
96+
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
97+
.idea/**/sonarIssues.xml
98+
99+
# Markdown Navigator plugin
100+
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
101+
.idea/**/markdown-navigator.xml
102+
.idea/**/markdown-navigator-enh.xml
103+
.idea/**/markdown-navigator/
104+
105+
# Cache file creation bug
106+
# See https://youtrack.jetbrains.com/issue/JBR-2257
107+
.idea/$CACHE_FILE$
108+
109+
# CodeStream plugin
110+
# https://plugins.jetbrains.com/plugin/12206-codestream
111+
.idea/codestream.xml
112+
113+
# Azure Toolkit for IntelliJ plugin
114+
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
115+
.idea/**/azureSettings.xml
4116

5117
### Linux ###
6118
*~
@@ -46,6 +158,10 @@ Network Trash Folder
46158
Temporary Items
47159
.apdisk
48160

161+
### macOS Patch ###
162+
# iCloud generated files
163+
*.icloud
164+
49165
### Node ###
50166
# Logs
51167
logs
@@ -103,6 +219,9 @@ web_modules/
103219
# Optional eslint cache
104220
.eslintcache
105221

222+
# Optional stylelint cache
223+
.stylelintcache
224+
106225
# Microbundle cache
107226
.rpt2_cache/
108227
.rts2_cache_cjs/
@@ -118,10 +237,12 @@ web_modules/
118237
# Yarn Integrity file
119238
.yarn-integrity
120239

121-
# dotenv environment variables file
240+
# dotenv environment variable files
122241
.env
123-
.env.test
124-
.env.production
242+
.env.development.local
243+
.env.test.local
244+
.env.production.local
245+
.env.local
125246

126247
# parcel-bundler cache (https://parceljs.org/)
127248
.cache
@@ -144,6 +265,12 @@ dist
144265
# vuepress build output
145266
.vuepress/dist
146267

268+
# vuepress v2.x temp and cache directory
269+
.temp
270+
271+
# Docusaurus cache and generated files
272+
.docusaurus
273+
147274
# Serverless directories
148275
.serverless/
149276

@@ -171,35 +298,29 @@ dist
171298
.webpack/
172299

173300
# Optional stylelint cache
174-
.stylelintcache
175301

176302
# SvelteKit build / generate output
177303
.svelte-kit
178304

179-
### Nuxtjs ###
180-
# Nuxt build
181-
182-
# Nuxt generate
183-
184305
### VisualStudioCode ###
185306
.vscode/*
186307
!.vscode/settings.json
187308
!.vscode/tasks.json
188309
!.vscode/launch.json
189310
!.vscode/extensions.json
190-
*.code-workspace
311+
!.vscode/*.code-snippets
191312

192313
# Local History for Visual Studio Code
193314
.history/
194315

316+
# Built Visual Studio Code Extensions
317+
*.vsix
318+
195319
### VisualStudioCode Patch ###
196320
# Ignore all local history of files
197321
.history
198322
.ionide
199323

200-
# Support for Project snippet scope
201-
!.vscode/*.code-snippets
202-
203324
### Windows ###
204325
# Windows thumbnail cache files
205326
Thumbs.db
@@ -226,4 +347,15 @@ $RECYCLE.BIN/
226347
# Windows shortcuts
227348
*.lnk
228349

229-
# End of https://www.toptal.com/developers/gitignore/api/node,windows,macos,linux,visualstudiocode
350+
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,node,windows,macos,linux,intellij
351+
352+
353+
/cypress/videos/
354+
/cypress/screenshots/
355+
356+
# Editor directories and files
357+
*.suo
358+
*.ntvs*
359+
*.njsproj
360+
*.sln
361+
*.sw?

template-nuxt3/client/layouts/basic.vue

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,21 @@
11
<script setup>
2-
const query = ref('')
3-
42
const serviceTitle = 'Service'
53
const serviceDescription = 'Description du service'
64
const logoText = ['Ministère', 'de l’intérieur']
75
86
const quickLinks = [
97
{
108
label: 'Home',
11-
path: '/',
9+
to: '/',
1210
icon: 'ri-home-2-line',
1311
},
1412
{
1513
label: 'À propos',
16-
path: '/apropos',
14+
to: '/apropos',
1715
icon: 'ri-flag-line',
1816
},
1917
]
2018
21-
const goFetch = () => {
22-
console.log('Fetching with query:', query.value)
23-
}
2419
</script>
2520

2621
<template>
@@ -30,8 +25,6 @@ const goFetch = () => {
3025
:service-description="serviceDescription"
3126
:logo-text="logoText"
3227
:quick-links="quickLinks"
33-
show-search
34-
@search="goFetch()"
3528
/>
3629
<div class="fr-container">
3730
<slot />

template-nuxt3/client/pages/apropos.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<script>
2-
export default {
1+
<script setup>
2+
definePageMeta({
33
layout: 'basic',
4-
}
4+
})
55
</script>
66

77
<template>

0 commit comments

Comments
 (0)