瀏覽代碼

Upgrade many packages

- Nuxt got quite a version bump
- Pinia plays nicer with Nuxt now without needing to create a plugin
Andrea Franceschini 1 年之前
父節點
當前提交
b4761ac415
共有 6 個文件被更改,包括 760 次插入308 次删除
  1. 18 17
      nuxt.config.ts
  2. 28 27
      package.json
  3. 0 11
      plugins/persistedstate.ts
  4. 2 0
      store/consent.ts
  5. 1 1
      tailwind.config.js
  6. 711 252
      yarn.lock

+ 18 - 17
nuxt.config.ts

@@ -1,4 +1,4 @@
-import { defineNuxtConfig } from 'nuxt';
+import { defineNuxtConfig } from 'nuxt/config';
 
 const description = 'I am a MSCA Research Fellow at the University of Padova working on educational videogames, but I also do other things.';
 
@@ -56,25 +56,13 @@ export default defineNuxtConfig({
         transpile: [
             'three'
         ],
-        postcss: {
-            postcssOptions: {
-                map: process.dev || false,
-                plugins: {
-                    'postcss-import': {},
-                    'postcss-mixins': {},
-                    'tailwindcss/nesting': {},
-                    'tailwindcss': {},
-                    'autoprefixer': {},
-                    'postcss-preset-env': {},
-                    'cssnano': {},
-                },
-            }
-        },
     },
     modules: [
         '@nuxtjs/tailwindcss',
         '@nuxtjs/google-fonts',
-        ['@pinia/nuxt', { autoImports: ['defineStore'] }],
+        // ['@pinia/nuxt', { autoImports: ['defineStore'] }],
+        '@pinia/nuxt',
+        '@pinia-plugin-persistedstate/nuxt',
     ],
     components: true,
     telemetry: false,
@@ -97,5 +85,18 @@ export default defineNuxtConfig({
         subsets: 'greek',
         download: true,
         // overwriting: true,
-    }
+    },
+    postcss: {
+        // map: process.dev || false,
+        plugins: {
+            'postcss-import': {},
+            'postcss-mixins': {},
+            'tailwindcss/nesting': {},
+            'tailwindcss': {},
+            'autoprefixer': {},
+            'postcss-preset-env': {},
+            'cssnano': {},
+        },
+    },
+
 })

+ 28 - 27
package.json

@@ -7,35 +7,36 @@
     "deploy": "NODE_ENV=production nuxi build && rsync -avPz --delete -e ssh .output/* vps:/var/server/htdocs/andreafranceschini.org/www/ && ssh vps docker restart -t 0 aforg"
   },
   "dependencies": {
-    "@fortawesome/fontawesome-svg-core": "^6.2.0",
-    "@fortawesome/free-brands-svg-icons": "^6.2.0",
-    "@fortawesome/free-regular-svg-icons": "^6.2.0",
-    "@fortawesome/free-solid-svg-icons": "^6.2.0",
-    "@fortawesome/vue-fontawesome": "^3.0.1",
-    "@nuxtjs/google-fonts": "^3.0.0-0",
-    "@nuxtjs/tailwindcss": "^5.3.5",
-    "@pinia/nuxt": "^0.4.3",
+    "@fortawesome/fontawesome-svg-core": "^6.4.2",
+    "@fortawesome/free-brands-svg-icons": "^6.4.2",
+    "@fortawesome/free-regular-svg-icons": "^6.4.2",
+    "@fortawesome/free-solid-svg-icons": "^6.4.2",
+    "@fortawesome/vue-fontawesome": "^3.0.3",
+    "@nuxtjs/google-fonts": "^3.0.2",
+    "@nuxtjs/tailwindcss": "^6.8.0",
+    "@pinia-plugin-persistedstate/nuxt": "^1.1.1",
+    "@pinia/nuxt": "^0.4.11",
     "@tailwindcss/aspect-ratio": "^0.4.2",
-    "@tailwindcss/typography": "^0.5.7",
-    "@types/animejs": "^3.1.5",
-    "@types/luxon": "^3.0.2",
-    "@types/node": "18.8.0",
-    "@types/three": "^0.144.0",
+    "@tailwindcss/typography": "^0.5.9",
+    "@types/animejs": "^3.1.7",
+    "@types/luxon": "^3.3.1",
+    "@types/node": "20.4.8",
+    "@types/three": "^0.155.0",
     "animejs": "^3.2.1",
-    "autoprefixer": "^10.4.12",
-    "cssnano": "^5.1.13",
-    "daisyui": "^2.31.0",
-    "luxon": "^3.0.4",
-    "nuxt": "^3.0.0-rc.11",
-    "pinia-plugin-persistedstate": "^2.3.0",
-    "postcss": "^8.4.18",
-    "postcss-import": "^15.0.0",
+    "autoprefixer": "^10.4.14",
+    "cssnano": "^6.0.1",
+    "daisyui": "^3.5.1",
+    "luxon": "^3.3.0",
+    "nuxt": "^3.6.5",
+    "pinia-plugin-persistedstate": "^3.2.0",
+    "postcss": "^8.4.27",
+    "postcss-import": "^15.1.0",
     "postcss-mixins": "^9.0.4",
-    "postcss-nested": "^6.0.0",
-    "postcss-preset-env": "^7.8.2",
-    "tailwindcss": "^3.1.8",
-    "three": "^0.145.0",
-    "typescript": "^4.8.4",
-    "vue-tsc": "^1.0.8"
+    "postcss-nested": "^6.0.1",
+    "postcss-preset-env": "^9.1.1",
+    "tailwindcss": "^3.3.3",
+    "three": "^0.155.0",
+    "typescript": "^5.1.6",
+    "vue-tsc": "^1.8.8"
   }
 }

+ 0 - 11
plugins/persistedstate.ts

@@ -1,11 +0,0 @@
-import { createNuxtPersistedState } from 'pinia-plugin-persistedstate/nuxt'
-
-export default defineNuxtPlugin(nuxtApp => {
-  const maxAge = 365*24*60*60;
-  const expires = new Date(Date.now() + 1000*maxAge);
-  nuxtApp.$pinia.use(createNuxtPersistedState(useCookie, {
-    cookieOptions: {
-      expires, maxAge
-    }
-  }))
-})

+ 2 - 0
store/consent.ts

@@ -1,3 +1,5 @@
+import {defineStore } from 'pinia'
+
 export const useConsent = defineStore('consent-store', {
     state: () => ({
         'preferenceGiven': false,

+ 1 - 1
tailwind.config.js

@@ -46,7 +46,7 @@ module.exports = {
         themes: [
             {
                 lofi: {
-                    ...require("daisyui/src/colors/themes")["[data-theme=lofi]"],
+                    ...require("daisyui/src/theming/themes")["[data-theme=lofi]"],
                     primary: 'white',
                     info: '#0284c7',
                     success: '#4e9a06',

文件差異過大導致無法顯示
+ 711 - 252
yarn.lock


部分文件因文件數量過多而無法顯示