Skip to content

Commit

Permalink
refactor: Migrate project to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
TNXG committed Oct 15, 2024
1 parent 1d4b5a6 commit 404b6a7
Show file tree
Hide file tree
Showing 60 changed files with 2,152 additions and 2,047 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"i18n-ally.localesPaths": "./locales",
"i18n-ally.localesPaths": "./src/locales",
"i18n-ally.enabledFrameworks": [
"vue",
"vue-sfc"
Expand Down
6 changes: 6 additions & 0 deletions app.config.js → app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@ export const appConfig = {
};

export default {
ui: {
notifications: {
// Show toasts at the top right of the screen
position: 'top-0 bottom-[unset]'
}
},
appConfig
};
16 changes: 0 additions & 16 deletions app.vue

This file was deleted.

File renamed without changes.
13 changes: 6 additions & 7 deletions nuxt.config.js → nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fileURLToPath } from 'node:url';
import { appConfig } from './app.config'; // 确保正确导入 appConfig
import { appConfig } from './app.config';

require('dotenv').config();

Expand Down Expand Up @@ -34,17 +34,16 @@ export default defineNuxtConfig({
'seiunsodou_mdc',
'nuxt-og-image'
],
typescript: {
typeCheck: true
},
srcDir: 'src/',
runtimeConfig: {
...runtimeEnv,
public: {
baseURL: process.env.NODE_ENV === 'development' ? 'http://localhost:3000' : appConfig.SiteConfig.SiteURL,
}
},
ui: {
notifications: {
position: 'top-0 left-0'
}
},
ogImage: {
fonts: [
'Noto+Sans+SC:400'
Expand All @@ -61,7 +60,7 @@ export default defineNuxtConfig({
{ code: 'ja', name: '日本語' }
],
defaultLocale: 'zh',
vueI18n: './i18n.config.js',
vueI18n: './i18n.config.ts',
strategy: 'no_prefix',
detectBrowserLanguage: {
useCookie: true,
Expand Down
49 changes: 27 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,50 +11,55 @@
"deploy": "vercel --prod"
},
"dependencies": {
"@nuxt/image": "^1.8.0",
"@nuxt/kit": "^3.13.1",
"@nuxt/ui": "^2.18.4",
"@nuxt/image": "^1.8.1",
"@nuxt/kit": "^3.13.2",
"@nuxt/ui": "^2.18.7",
"@nuxtjs/google-fonts": "^3.2.0",
"@nuxtjs/i18n": "^8.5.2",
"@nuxtjs/i18n": "^8.5.5",
"@nuxtjs/seo": "2.0.0-rc.15",
"@nuxtjs/sitemap": "^5.3.5",
"@pinia/nuxt": "^0.5.4",
"@pinia/nuxt": "^0.5.5",
"@types/bcryptjs": "^2.4.6",
"@types/jsonwebtoken": "^9.0.7",
"@types/nodemailer": "^6.4.16",
"bcryptjs": "^2.4.3",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.13",
"dotenv": "^16.4.5",
"feed": "^4.2.2",
"flowbite": "^2.5.1",
"flowbite": "^2.5.2",
"jsonwebtoken": "^9.0.2",
"markdown-it": "^14.1.0",
"mongodb": "^6.8.1",
"naive-ui": "^2.39.0",
"mongodb": "^6.9.0",
"naive-ui": "^2.40.1",
"nodemailer": "^6.9.15",
"nuxt": "^3.13.1",
"nuxt": "^3.13.2",
"nuxt-delay-hydration": "^1.3.8",
"nuxt-icon-tw": "^0.1.4",
"nuxt-og-image": "3.0.0-rc.66",
"nuxt-site-config": "^2.2.17",
"nuxt-site-config": "^2.2.18",
"nuxtjs-naive-ui": "^1.0.2",
"openai": "^4.58.2",
"pinia": "^2.2.2",
"openai": "^4.67.3",
"pinia": "^2.2.4",
"remark-emoji": "^5.0.1",
"seiunsodou_mdc": "^0.8.4",
"sharp": "^0.33.5",
"stream": "^0.0.3",
"vite": "^5.4.3",
"vue": "^3.5.4",
"vue-i18n": "^9.14.0"
"typescript": "^5.6.3",
"vite": "^5.4.9",
"vue": "^3.5.12",
"vue-i18n": "^9.14.1",
"vue-tsc": "^2.1.6"
},
"devDependencies": {
"@iconify-json/codicon": "^1.2.0",
"@iconify-json/codicon": "^1.2.2",
"@iconify-json/grommet-icons": "^1.2.0",
"@iconify-json/material-symbols": "^1.2.1",
"@iconify-json/mdi": "^1.2.0",
"@iconify-json/material-symbols": "^1.2.4",
"@iconify-json/mdi": "^1.2.1",
"autoprefixer": "^10.4.20",
"daisyui": "^4.12.10",
"globals": "^15.9.0",
"postcss": "^8.4.45",
"tailwindcss": "^3.4.10"
"daisyui": "^4.12.13",
"globals": "^15.11.0",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.14"
}
}
Loading

0 comments on commit 404b6a7

Please sign in to comment.