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 ###
# 0 : majles.tavasi.ir 1: qanon.parliran.ir
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_ENABLE_IDB=1

View File

@ -1,4 +1,4 @@
// middleware/redirect.js
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;
let mainStyle = `~/assets/common/scss/${buildName}-styles.scss`;
if (buildName == "hadith")
mainStyle = `~/systems/${buildName}_ui/assets/${buildName}/scss/${buildName}.css`;
if (buildName == "haditha")
mainStyle = `~/systems/${buildName.substring(
0,
buildName.length - 1
)}_ui/assets/${buildName}/scss/${buildName}.css`;
export default defineNuxtConfig({
hooks: {
"build:before": () => {
if (buildName == "hadith") {
if (buildName == "haditha") {
const sourceDir = path.resolve(
__dirname,
`systems/${buildName}_ui/assets/${buildName}/images`
`systems/${buildName.substring(
0,
buildName.length - 1
)}_ui/assets/${buildName}/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
fs.ensureDirSync(targetDir);
@ -89,59 +95,59 @@ export default defineNuxtConfig({
},
// --------------------- end: Research routes ---------------------
// --------------------- start: hadith routes ---------------------
// --------------------- start: haditha routes ---------------------
{
name: "hadith",
path: "/hadith",
file: "~/systems/hadith_ui/pages/hadith/index.vue",
name: "haditha",
path: "/haditha",
file: "~/systems/hadith_ui/pages/haditha/index.vue",
},
{
name: "hadithSearch",
path: "/hadith/search",
file: "~/systems/hadith_ui/pages/hadith/search/index.vue",
name: "hadithaSearch",
path: "/haditha/search",
file: "~/systems/hadith_ui/pages/haditha/search/index.vue",
},
{
name: "hadithChatBot",
path: "/hadith/chat-bot",
file: "~/systems/hadith_ui/pages/hadith/chat-bot.vue",
name: "hadithaChatBot",
path: "/haditha/chat-bot",
file: "~/systems/hadith_ui/pages/haditha/chat-bot.vue",
},
{
name: "hadithFavorites",
path: "/hadith/favorites",
file: "~/systems/hadith_ui/pages/hadith/favorites/index.vue",
name: "hadithaFavorites",
path: "/haditha/favorites",
file: "~/systems/hadith_ui/pages/haditha/favorites/index.vue",
},
{
name: "hadithLibrary",
path: "/hadith/library",
file: "~/systems/hadith_ui/pages/hadith/library/index.vue",
name: "hadithaLibrary",
path: "/haditha/library",
file: "~/systems/hadith_ui/pages/haditha/library/index.vue",
},
{
name: "hadithLibraryShow",
path: "/hadith/library/:id/:slug?",
file: "~/systems/hadith_ui/pages/hadith/library/[id]/[slug]/index.vue",
name: "hadithaLibraryShow",
path: "/haditha/library/:id/:slug?",
file: "~/systems/hadith_ui/pages/haditha/library/[id]/[slug]/index.vue",
},
{
name: "hadithAbout",
path: "/hadith/about-us",
file: "~/systems/hadith_ui/pages/hadith/public-pages/about-us.vue",
name: "hadithaAbout",
path: "/haditha/about-us",
file: "~/systems/hadith_ui/pages/haditha/public-pages/about-us.vue",
},
{
name: "hadithContact",
path: "/hadith/contact-us",
file: "~/systems/hadith_ui/pages/hadith/public-pages/ContactUs.vue",
name: "hadithaContact",
path: "/haditha/contact-us",
file: "~/systems/hadith_ui/pages/haditha/public-pages/ContactUs.vue",
},
{
name: "hadithRules",
path: "/hadith/rules",
file: "~/systems/hadith_ui/pages/hadith/public-pages/rules.vue",
name: "hadithaRules",
path: "/haditha/rules",
file: "~/systems/hadith_ui/pages/haditha/public-pages/rules.vue",
},
{
name: "hadithLogin",
path: "/hadith/login",
file: "~/systems/hadith_ui/pages/hadith/login.vue",
name: "hadithaLogin",
path: "/haditha/login",
file: "~/systems/hadith_ui/pages/haditha/login.vue",
}
// --------------------- end: hadith routes ---------------------
// --------------------- end: haditha routes ---------------------
);
},
},
@ -191,10 +197,12 @@ export default defineNuxtConfig({
// "@nuxtjs/supabase",
],
icon: {
customCollections: [{
prefix: 'haditha',
dir: `./systems/${buildName}_ui/assets/${buildName}/svg`
}]
customCollections: [
{
prefix: "haditha",
dir: `./systems/${buildName}_ui/assets/${buildName}/font-icons`,
},
],
},
// ui: {
// 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',
// mode: 'init'
// },
image: {
inject: true,
quality: 80,
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,
},
},
},
},
// image: {
// provider: "ipx",
// quality: 100,
// },
i18n: {
vueI18n: "./i18n.config.ts", // if you are using custom path, default
},
@ -277,7 +266,7 @@ export default defineNuxtConfig({
"@pages": "~/pages",
"@search": "~/systems/search_ui",
"@research": "~/systems/research_ui",
"@hadith": "~/systems/hadith_ui",
"@haditha": "~/systems/hadith_ui",
},
vite: {
resolve: {},

View File

@ -11,8 +11,8 @@
"postinstall": "nuxt prepare",
"dev-tavasi": "env-cmd -f .env.tavasi 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",
"build-hadith": "env-cmd -f .env.hadith nuxt build"
"dev-haditha": "env-cmd -f .env.haditha nuxt dev --host --inspect",
"build-haditha": "env-cmd -f .env.haditha nuxt build"
},
"dependencies": {
"@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