Remove extra files

Update nuxt.config
This commit is contained in:
mustafa-rezae 2025-03-06 14:59:42 +03:30
parent be39f7377b
commit d1373fb94c
64 changed files with 103 additions and 71 deletions

View File

@ -7,9 +7,9 @@ VITE_APP_NAME=Hadith
### Relative pathes for systems sass addressing ### ### Relative pathes for systems sass addressing ###
# 0 : majles.tavasi.ir 1: qanon.parliran.ir # 0 : majles.tavasi.ir 1: qanon.parliran.ir
VITE_BUILD_STATE=0 VITE_BUILD_STATE=0
VITE_BUILD_NAME=hadith VITE_BUILD_NAME=haditha
VITE_IDB_NAME=hadith VITE_IDB_NAME=haditha
VITE_IDB_VERSION=1 VITE_IDB_VERSION=1
VITE_ENABLE_IDB=1 VITE_ENABLE_IDB=1

View File

@ -1,4 +1,4 @@
// middleware/redirect.js // middleware/redirect.js
export default defineNuxtRouteMiddleware((to, from) => { export default defineNuxtRouteMiddleware((to, from) => {
if (buildName() == "hadith" && to.path == '/') return navigateTo({ name: "hadith" }); if (buildName() == "haditha" && to.path == '/') return navigateTo({ name: "haditha" });
}); });

View File

@ -15,18 +15,24 @@ for (let e in envs) {
const buildName = import.meta.env.VITE_BUILD_NAME; const buildName = import.meta.env.VITE_BUILD_NAME;
let mainStyle = `~/assets/common/scss/${buildName}-styles.scss`; let mainStyle = `~/assets/common/scss/${buildName}-styles.scss`;
if (buildName == "hadith") if (buildName == "haditha")
mainStyle = `~/systems/${buildName}_ui/assets/${buildName}/scss/${buildName}.css`; mainStyle = `~/systems/${buildName.substring(
0,
buildName.length - 1
)}_ui/assets/${buildName}/scss/${buildName}.css`;
export default defineNuxtConfig({ export default defineNuxtConfig({
hooks: { hooks: {
"build:before": () => { "build:before": () => {
if (buildName == "hadith") { if (buildName == "haditha") {
const sourceDir = path.resolve( const sourceDir = path.resolve(
__dirname, __dirname,
`systems/${buildName}_ui/assets/${buildName}/images` `systems/${buildName.substring(
0,
buildName.length - 1
)}_ui/assets/${buildName}/images`
); // Source folder (e.g., assets/images) ); // Source folder (e.g., assets/images)
const targetDir = path.resolve(__dirname, "public/img"); // Target folder (e.g., public/images) const targetDir = path.resolve(__dirname, `public/img/${buildName}`); // Target folder (e.g., public/images)
// Ensure the target directory exists // Ensure the target directory exists
fs.ensureDirSync(targetDir); fs.ensureDirSync(targetDir);
@ -89,59 +95,59 @@ export default defineNuxtConfig({
}, },
// --------------------- end: Research routes --------------------- // --------------------- end: Research routes ---------------------
// --------------------- start: hadith routes --------------------- // --------------------- start: haditha routes ---------------------
{ {
name: "hadith", name: "haditha",
path: "/hadith", path: "/haditha",
file: "~/systems/hadith_ui/pages/hadith/index.vue", file: "~/systems/hadith_ui/pages/haditha/index.vue",
}, },
{ {
name: "hadithSearch", name: "hadithaSearch",
path: "/hadith/search", path: "/haditha/search",
file: "~/systems/hadith_ui/pages/hadith/search/index.vue", file: "~/systems/hadith_ui/pages/haditha/search/index.vue",
}, },
{ {
name: "hadithChatBot", name: "hadithaChatBot",
path: "/hadith/chat-bot", path: "/haditha/chat-bot",
file: "~/systems/hadith_ui/pages/hadith/chat-bot.vue", file: "~/systems/hadith_ui/pages/haditha/chat-bot.vue",
}, },
{ {
name: "hadithFavorites", name: "hadithaFavorites",
path: "/hadith/favorites", path: "/haditha/favorites",
file: "~/systems/hadith_ui/pages/hadith/favorites/index.vue", file: "~/systems/hadith_ui/pages/haditha/favorites/index.vue",
}, },
{ {
name: "hadithLibrary", name: "hadithaLibrary",
path: "/hadith/library", path: "/haditha/library",
file: "~/systems/hadith_ui/pages/hadith/library/index.vue", file: "~/systems/hadith_ui/pages/haditha/library/index.vue",
}, },
{ {
name: "hadithLibraryShow", name: "hadithaLibraryShow",
path: "/hadith/library/:id/:slug?", path: "/haditha/library/:id/:slug?",
file: "~/systems/hadith_ui/pages/hadith/library/[id]/[slug]/index.vue", file: "~/systems/hadith_ui/pages/haditha/library/[id]/[slug]/index.vue",
}, },
{ {
name: "hadithAbout", name: "hadithaAbout",
path: "/hadith/about-us", path: "/haditha/about-us",
file: "~/systems/hadith_ui/pages/hadith/public-pages/about-us.vue", file: "~/systems/hadith_ui/pages/haditha/public-pages/about-us.vue",
}, },
{ {
name: "hadithContact", name: "hadithaContact",
path: "/hadith/contact-us", path: "/haditha/contact-us",
file: "~/systems/hadith_ui/pages/hadith/public-pages/ContactUs.vue", file: "~/systems/hadith_ui/pages/haditha/public-pages/ContactUs.vue",
}, },
{ {
name: "hadithRules", name: "hadithaRules",
path: "/hadith/rules", path: "/haditha/rules",
file: "~/systems/hadith_ui/pages/hadith/public-pages/rules.vue", file: "~/systems/hadith_ui/pages/haditha/public-pages/rules.vue",
}, },
{ {
name: "hadithLogin", name: "hadithaLogin",
path: "/hadith/login", path: "/haditha/login",
file: "~/systems/hadith_ui/pages/hadith/login.vue", file: "~/systems/hadith_ui/pages/haditha/login.vue",
} }
// --------------------- end: hadith routes --------------------- // --------------------- end: haditha routes ---------------------
); );
}, },
}, },
@ -191,10 +197,12 @@ export default defineNuxtConfig({
// "@nuxtjs/supabase", // "@nuxtjs/supabase",
], ],
icon: { icon: {
customCollections: [{ customCollections: [
prefix: 'haditha', {
dir: `./systems/${buildName}_ui/assets/${buildName}/svg` prefix: "haditha",
}] dir: `./systems/${buildName}_ui/assets/${buildName}/font-icons`,
},
],
}, },
// ui: { // ui: {
// prefix: 'Nuxt', //Use the prefix option to change the prefix of the components. Default: U // prefix: 'Nuxt', //Use the prefix option to change the prefix of the components. Default: U
@ -209,29 +217,10 @@ export default defineNuxtConfig({
// debug: process.env.NODE_ENV === 'development', // debug: process.env.NODE_ENV === 'development',
// mode: 'init' // mode: 'init'
// }, // },
image: { // image: {
inject: true, // provider: "ipx",
quality: 80, // quality: 100,
format: ["webp", "jpeg", "jpg", "png", "gif", "avif"], // },
screens: {
xs: 320,
sm: 576,
md: 768,
lg: 1199,
xl: 1400,
xxl: 1600,
"2xl": 1920,
},
presets: {
avatar: {
modifiers: {
format: "jpg",
width: 25,
height: 24,
},
},
},
},
i18n: { i18n: {
vueI18n: "./i18n.config.ts", // if you are using custom path, default vueI18n: "./i18n.config.ts", // if you are using custom path, default
}, },
@ -277,7 +266,7 @@ export default defineNuxtConfig({
"@pages": "~/pages", "@pages": "~/pages",
"@search": "~/systems/search_ui", "@search": "~/systems/search_ui",
"@research": "~/systems/research_ui", "@research": "~/systems/research_ui",
"@hadith": "~/systems/hadith_ui", "@haditha": "~/systems/hadith_ui",
}, },
vite: { vite: {
resolve: {}, resolve: {},

View File

@ -11,8 +11,8 @@
"postinstall": "nuxt prepare", "postinstall": "nuxt prepare",
"dev-tavasi": "env-cmd -f .env.tavasi nuxt dev --host --inspect", "dev-tavasi": "env-cmd -f .env.tavasi nuxt dev --host --inspect",
"dev-monir": "env-cmd -f .env.monir nuxt dev --host --inspect", "dev-monir": "env-cmd -f .env.monir nuxt dev --host --inspect",
"dev-hadith": "env-cmd -f .env.hadith nuxt dev --host --inspect", "dev-haditha": "env-cmd -f .env.haditha nuxt dev --host --inspect",
"build-hadith": "env-cmd -f .env.hadith nuxt build" "build-haditha": "env-cmd -f .env.haditha nuxt build"
}, },
"dependencies": { "dependencies": {
"@nuxt/image": "^1.8.1", "@nuxt/image": "^1.8.1",

View File

Before

Width:  |  Height:  |  Size: 490 KiB

After

Width:  |  Height:  |  Size: 490 KiB

View File

Before

Width:  |  Height:  |  Size: 783 KiB

After

Width:  |  Height:  |  Size: 783 KiB

View File

Before

Width:  |  Height:  |  Size: 263 KiB

After

Width:  |  Height:  |  Size: 263 KiB

View File

Before

Width:  |  Height:  |  Size: 203 KiB

After

Width:  |  Height:  |  Size: 203 KiB

View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 186 KiB

View File

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 113 KiB

View File

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 198 KiB

View File

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View File

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,41 @@
{
"name": "App",
"icons": [
{
"src": "\/android-icon-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "\/android-icon-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "\/android-icon-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "\/android-icon-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "\/android-icon-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "\/android-icon-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 269 KiB

After

Width:  |  Height:  |  Size: 269 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 304 KiB

After

Width:  |  Height:  |  Size: 304 KiB

View File

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

View File

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 95 KiB

View File

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 107 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 630 B

After

Width:  |  Height:  |  Size: 630 B

View File

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 174 B

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 161 KiB

@ -1 +1 @@
Subproject commit 658c28e45c1cda4c0a27e282639cfdca13f4a34c Subproject commit 953d98f3beb62044c320f5fcfb8a000f5e8264d0