From 7e5953b70321255aa8016233aac000ff2118c6d4 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 17 Mar 2024 15:17:53 +0500 Subject: [PATCH] refactor!: move files to src (#63) --- nuxt.config.ts | 1 + app.vue => src/app.vue | 0 {assets => src/assets}/style/tailwind.css | 0 {components => src/components}/Group.vue | 0 {components => src/components}/Item.vue | 0 {components => src/components}/Message.vue | 0 {components => src/components}/Update.vue | 0 {components => src/components}/service/IpApi.vue | 0 .../components}/service/OpenWeatherMap.vue | 0 .../components}/service/Placeholder.vue | 0 .../components}/service/base/Icon.vue | 0 .../components}/service/base/Index.vue | 0 .../components}/service/base/Status.vue | 0 {components => src/components}/service/base/Tag.vue | 0 {composables => src/composables}/services.ts | 0 error.vue => src/error.vue | 0 {layouts => src/layouts}/default.vue | 0 {locales => src/locales}/ar-SA.json | 0 {locales => src/locales}/en-US.json | 0 {locales => src/locales}/es-ES.json | 0 {locales => src/locales}/fr-FR.json | 0 {locales => src/locales}/hi-IN.json | 0 {locales => src/locales}/pl-PL.json | 0 {locales => src/locales}/ru-RU.json | 0 {locales => src/locales}/zh-CN.json | 0 {pages => src/pages}/index.vue | 0 {plugins => src/plugins}/settings.ts | 0 .../public}/favicons/apple-touch-icon.png | Bin {public => src/public}/favicons/favicon.ico | Bin {public => src/public}/favicons/pwa-192x192.png | Bin {public => src/public}/favicons/pwa-512x512.png | Bin {public => src/public}/robots.txt | 0 {server => src/server}/api/services/base.ts | 0 {server => src/server}/api/services/ip-api.ts | 0 .../server}/api/services/openweathermap.ts | 0 {server => src/server}/api/settings.ts | 0 {server => src/server}/api/update.ts | 2 +- {server => src/server}/plugins/1.config-loader.ts | 0 {server => src/server}/tsconfig.json | 0 {server => src/server}/utils/config.ts | 0 {server => src/server}/utils/logger.ts | 0 {server => src/server}/utils/services.ts | 0 {server => src/server}/validations/config.ts | 0 {server => src/server}/validations/index.ts | 0 {server => src/server}/validations/service.ts | 0 {types => src/types}/config.d.ts | 0 {types => src/types}/index.d.ts | 0 {types => src/types}/services.d.ts | 0 {utils => src/utils}/validation.ts | 0 49 files changed, 2 insertions(+), 1 deletion(-) rename app.vue => src/app.vue (100%) rename {assets => src/assets}/style/tailwind.css (100%) rename {components => src/components}/Group.vue (100%) rename {components => src/components}/Item.vue (100%) rename {components => src/components}/Message.vue (100%) rename {components => src/components}/Update.vue (100%) rename {components => src/components}/service/IpApi.vue (100%) rename {components => src/components}/service/OpenWeatherMap.vue (100%) rename {components => src/components}/service/Placeholder.vue (100%) rename {components => src/components}/service/base/Icon.vue (100%) rename {components => src/components}/service/base/Index.vue (100%) rename {components => src/components}/service/base/Status.vue (100%) rename {components => src/components}/service/base/Tag.vue (100%) rename {composables => src/composables}/services.ts (100%) rename error.vue => src/error.vue (100%) rename {layouts => src/layouts}/default.vue (100%) rename {locales => src/locales}/ar-SA.json (100%) rename {locales => src/locales}/en-US.json (100%) rename {locales => src/locales}/es-ES.json (100%) rename {locales => src/locales}/fr-FR.json (100%) rename {locales => src/locales}/hi-IN.json (100%) rename {locales => src/locales}/pl-PL.json (100%) rename {locales => src/locales}/ru-RU.json (100%) rename {locales => src/locales}/zh-CN.json (100%) rename {pages => src/pages}/index.vue (100%) rename {plugins => src/plugins}/settings.ts (100%) rename {public => src/public}/favicons/apple-touch-icon.png (100%) rename {public => src/public}/favicons/favicon.ico (100%) rename {public => src/public}/favicons/pwa-192x192.png (100%) rename {public => src/public}/favicons/pwa-512x512.png (100%) rename {public => src/public}/robots.txt (100%) rename {server => src/server}/api/services/base.ts (100%) rename {server => src/server}/api/services/ip-api.ts (100%) rename {server => src/server}/api/services/openweathermap.ts (100%) rename {server => src/server}/api/settings.ts (100%) rename {server => src/server}/api/update.ts (91%) rename {server => src/server}/plugins/1.config-loader.ts (100%) rename {server => src/server}/tsconfig.json (100%) rename {server => src/server}/utils/config.ts (100%) rename {server => src/server}/utils/logger.ts (100%) rename {server => src/server}/utils/services.ts (100%) rename {server => src/server}/validations/config.ts (100%) rename {server => src/server}/validations/index.ts (100%) rename {server => src/server}/validations/service.ts (100%) rename {types => src/types}/config.d.ts (100%) rename {types => src/types}/index.d.ts (100%) rename {types => src/types}/services.d.ts (100%) rename {utils => src/utils}/validation.ts (100%) diff --git a/nuxt.config.ts b/nuxt.config.ts index b8944fe..b2955e0 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,6 +1,7 @@ import process from 'node:process' export default defineNuxtConfig({ + srcDir: 'src', app: { head: { link: [ diff --git a/app.vue b/src/app.vue similarity index 100% rename from app.vue rename to src/app.vue diff --git a/assets/style/tailwind.css b/src/assets/style/tailwind.css similarity index 100% rename from assets/style/tailwind.css rename to src/assets/style/tailwind.css diff --git a/components/Group.vue b/src/components/Group.vue similarity index 100% rename from components/Group.vue rename to src/components/Group.vue diff --git a/components/Item.vue b/src/components/Item.vue similarity index 100% rename from components/Item.vue rename to src/components/Item.vue diff --git a/components/Message.vue b/src/components/Message.vue similarity index 100% rename from components/Message.vue rename to src/components/Message.vue diff --git a/components/Update.vue b/src/components/Update.vue similarity index 100% rename from components/Update.vue rename to src/components/Update.vue diff --git a/components/service/IpApi.vue b/src/components/service/IpApi.vue similarity index 100% rename from components/service/IpApi.vue rename to src/components/service/IpApi.vue diff --git a/components/service/OpenWeatherMap.vue b/src/components/service/OpenWeatherMap.vue similarity index 100% rename from components/service/OpenWeatherMap.vue rename to src/components/service/OpenWeatherMap.vue diff --git a/components/service/Placeholder.vue b/src/components/service/Placeholder.vue similarity index 100% rename from components/service/Placeholder.vue rename to src/components/service/Placeholder.vue diff --git a/components/service/base/Icon.vue b/src/components/service/base/Icon.vue similarity index 100% rename from components/service/base/Icon.vue rename to src/components/service/base/Icon.vue diff --git a/components/service/base/Index.vue b/src/components/service/base/Index.vue similarity index 100% rename from components/service/base/Index.vue rename to src/components/service/base/Index.vue diff --git a/components/service/base/Status.vue b/src/components/service/base/Status.vue similarity index 100% rename from components/service/base/Status.vue rename to src/components/service/base/Status.vue diff --git a/components/service/base/Tag.vue b/src/components/service/base/Tag.vue similarity index 100% rename from components/service/base/Tag.vue rename to src/components/service/base/Tag.vue diff --git a/composables/services.ts b/src/composables/services.ts similarity index 100% rename from composables/services.ts rename to src/composables/services.ts diff --git a/error.vue b/src/error.vue similarity index 100% rename from error.vue rename to src/error.vue diff --git a/layouts/default.vue b/src/layouts/default.vue similarity index 100% rename from layouts/default.vue rename to src/layouts/default.vue diff --git a/locales/ar-SA.json b/src/locales/ar-SA.json similarity index 100% rename from locales/ar-SA.json rename to src/locales/ar-SA.json diff --git a/locales/en-US.json b/src/locales/en-US.json similarity index 100% rename from locales/en-US.json rename to src/locales/en-US.json diff --git a/locales/es-ES.json b/src/locales/es-ES.json similarity index 100% rename from locales/es-ES.json rename to src/locales/es-ES.json diff --git a/locales/fr-FR.json b/src/locales/fr-FR.json similarity index 100% rename from locales/fr-FR.json rename to src/locales/fr-FR.json diff --git a/locales/hi-IN.json b/src/locales/hi-IN.json similarity index 100% rename from locales/hi-IN.json rename to src/locales/hi-IN.json diff --git a/locales/pl-PL.json b/src/locales/pl-PL.json similarity index 100% rename from locales/pl-PL.json rename to src/locales/pl-PL.json diff --git a/locales/ru-RU.json b/src/locales/ru-RU.json similarity index 100% rename from locales/ru-RU.json rename to src/locales/ru-RU.json diff --git a/locales/zh-CN.json b/src/locales/zh-CN.json similarity index 100% rename from locales/zh-CN.json rename to src/locales/zh-CN.json diff --git a/pages/index.vue b/src/pages/index.vue similarity index 100% rename from pages/index.vue rename to src/pages/index.vue diff --git a/plugins/settings.ts b/src/plugins/settings.ts similarity index 100% rename from plugins/settings.ts rename to src/plugins/settings.ts diff --git a/public/favicons/apple-touch-icon.png b/src/public/favicons/apple-touch-icon.png similarity index 100% rename from public/favicons/apple-touch-icon.png rename to src/public/favicons/apple-touch-icon.png diff --git a/public/favicons/favicon.ico b/src/public/favicons/favicon.ico similarity index 100% rename from public/favicons/favicon.ico rename to src/public/favicons/favicon.ico diff --git a/public/favicons/pwa-192x192.png b/src/public/favicons/pwa-192x192.png similarity index 100% rename from public/favicons/pwa-192x192.png rename to src/public/favicons/pwa-192x192.png diff --git a/public/favicons/pwa-512x512.png b/src/public/favicons/pwa-512x512.png similarity index 100% rename from public/favicons/pwa-512x512.png rename to src/public/favicons/pwa-512x512.png diff --git a/public/robots.txt b/src/public/robots.txt similarity index 100% rename from public/robots.txt rename to src/public/robots.txt diff --git a/server/api/services/base.ts b/src/server/api/services/base.ts similarity index 100% rename from server/api/services/base.ts rename to src/server/api/services/base.ts diff --git a/server/api/services/ip-api.ts b/src/server/api/services/ip-api.ts similarity index 100% rename from server/api/services/ip-api.ts rename to src/server/api/services/ip-api.ts diff --git a/server/api/services/openweathermap.ts b/src/server/api/services/openweathermap.ts similarity index 100% rename from server/api/services/openweathermap.ts rename to src/server/api/services/openweathermap.ts diff --git a/server/api/settings.ts b/src/server/api/settings.ts similarity index 100% rename from server/api/settings.ts rename to src/server/api/settings.ts diff --git a/server/api/update.ts b/src/server/api/update.ts similarity index 91% rename from server/api/update.ts rename to src/server/api/update.ts index f690327..f99989a 100644 --- a/server/api/update.ts +++ b/src/server/api/update.ts @@ -1,4 +1,4 @@ -import currentPackage from '~/package.json' +import currentPackage from '~~/package.json' export default defineEventHandler(async () => { const latestPackage = await $fetch('https://raw.githubusercontent.com/hywax/mafl/main/package.json', { diff --git a/server/plugins/1.config-loader.ts b/src/server/plugins/1.config-loader.ts similarity index 100% rename from server/plugins/1.config-loader.ts rename to src/server/plugins/1.config-loader.ts diff --git a/server/tsconfig.json b/src/server/tsconfig.json similarity index 100% rename from server/tsconfig.json rename to src/server/tsconfig.json diff --git a/server/utils/config.ts b/src/server/utils/config.ts similarity index 100% rename from server/utils/config.ts rename to src/server/utils/config.ts diff --git a/server/utils/logger.ts b/src/server/utils/logger.ts similarity index 100% rename from server/utils/logger.ts rename to src/server/utils/logger.ts diff --git a/server/utils/services.ts b/src/server/utils/services.ts similarity index 100% rename from server/utils/services.ts rename to src/server/utils/services.ts diff --git a/server/validations/config.ts b/src/server/validations/config.ts similarity index 100% rename from server/validations/config.ts rename to src/server/validations/config.ts diff --git a/server/validations/index.ts b/src/server/validations/index.ts similarity index 100% rename from server/validations/index.ts rename to src/server/validations/index.ts diff --git a/server/validations/service.ts b/src/server/validations/service.ts similarity index 100% rename from server/validations/service.ts rename to src/server/validations/service.ts diff --git a/types/config.d.ts b/src/types/config.d.ts similarity index 100% rename from types/config.d.ts rename to src/types/config.d.ts diff --git a/types/index.d.ts b/src/types/index.d.ts similarity index 100% rename from types/index.d.ts rename to src/types/index.d.ts diff --git a/types/services.d.ts b/src/types/services.d.ts similarity index 100% rename from types/services.d.ts rename to src/types/services.d.ts diff --git a/utils/validation.ts b/src/utils/validation.ts similarity index 100% rename from utils/validation.ts rename to src/utils/validation.ts