diff --git a/.theme/app/app.vue b/.theme/app/app.vue
index 294d1aea2..7056dcd08 100644
--- a/.theme/app/app.vue
+++ b/.theme/app/app.vue
@@ -1,5 +1,5 @@
-
+
@@ -17,4 +17,4 @@ useHead({
}
]
});
-
\ No newline at end of file
+
diff --git a/.theme/package.json b/.theme/package.json
index 694da5909..0b1320c0f 100644
--- a/.theme/package.json
+++ b/.theme/package.json
@@ -2,12 +2,12 @@
"type": "module",
"scripts": {
"lint": "eslint .",
- "setup": "npm run lint && cross-env-shell node -r dotenv/config prebuild dotenv_config_path=.env.$npm_config_env",
+ "setup": "npm run lint && npx cross-var node -r dotenv/config prebuild dotenv_config_path=.env.$npm_config_env",
"predev": "npm run setup --env=local",
"dev": "nuxi dev --dotenv .env.local",
"build": "nuxi build",
- "pregenerate": "cross-env-shell npm run setup --env=$npm_config_env",
- "generate": "cross-env-shell nuxi generate --dotenv .env.$npm_config_env",
+ "pregenerate": "npx cross-var npm run setup --env=$npm_config_env",
+ "generate": "npx cross-var nuxi generate --dotenv .env.$npm_config_env",
"generate:local": "npm run generate --env=local",
"generate:production": "npm run generate --env=production",
"postinstall": "nuxi prepare",
@@ -22,7 +22,6 @@
"@nuxtjs/i18n": "10.1.0",
"@pinia/nuxt": "0.11.2",
"@primevue/nuxt-module": "4.3.9",
- "cross-env": "10.0.0",
"log-symbols": "7.0.1",
"nuxt": "4.1.2"
},
diff --git a/Makefile b/Makefile
index 576be32ed..ab5b84e69 100644
--- a/Makefile
+++ b/Makefile
@@ -3,20 +3,13 @@
install:
@(cd .theme && npm i && npm ci)
run:
- @echo "(1) Development"
- @echo "(2) Local"
+ @echo "(1) dev"
+ @echo "(2) local"
@read -p "Please select 1-2: " app ; \
case $$app in \
- 1) (cd .theme && npm run -s dev && cd ..) ;; \
- 2) (cd .theme && npm run -s local && cd ..) ;; \
+ 1) (cd .theme && npm run -s dev) ;; \
+ 2) (cd .theme && npm run -s local) ;; \
*) echo "Invalid option" ;; \
esac
build:
- @echo "(1) Production"
- @echo "(2) Local"
- @read -p "Please select 1-2: " app ; \
- case $$app in \
- 1) (cd .theme && npm run -s generate:production && cd ..) ;; \
- 2) (cd .theme && npm run -s generate:local && cd ..) ;; \
- *) echo "Invalid option" ;; \
- esac
+ @(cd .theme && npm run -s generate:local)
diff --git a/build-and-run.md b/build-and-run.md
index 162d14f24..46db7499c 100644
--- a/build-and-run.md
+++ b/build-and-run.md
@@ -7,19 +7,17 @@ position: 101
To create a static site we use `nuxi generate`, to run the project in
development mode we use `nuxi dev`.
-For unix-like systems use `Makefile`;
+To build and run use below commands in a terminal window;
```bash
make build
make run
```
-For Windows systems use `build.bat`;
-
-```bash
-.\build.bat
-.\run.bat
-```
+> [!NOTE]
+>
+> This syntax works for all systems. It uses `Makefile` for unix-like systems
+> and `make.cmd` for Windows systems.
## Process
diff --git a/build.bat b/build.bat
deleted file mode 100644
index d9c8daf20..000000000
--- a/build.bat
+++ /dev/null
@@ -1,17 +0,0 @@
-@echo off
-:BEGIN
-echo (1) Production
-echo (2) Local
-CHOICE /N /C:12 /M "Pick mode"
-IF ERRORLEVEL == 2 GOTO Local
-IF ERRORLEVEL == 1 GOTO Production
-GOTO END
-:Production
-cd .theme
-npm run generate:production
-cd ..
-:Local
-cd .theme
-npm run generate:local
-cd ..
-END:
\ No newline at end of file
diff --git a/make.cmd b/make.cmd
new file mode 100644
index 000000000..8cd44c7c0
--- /dev/null
+++ b/make.cmd
@@ -0,0 +1,46 @@
+@REM Generated By GPT
+@REM Modified By CD
+@echo off
+setlocal enabledelayedexpansion
+
+if "%1"=="" (
+ echo Usage: %0 ^
+ echo.
+ echo Available commands: install, run, build
+ exit /b 1
+)
+
+set CMD=%1
+
+if /i "%CMD%"=="install" goto install
+if /i "%CMD%"=="run" goto run
+if /i "%CMD%"=="build" goto build
+
+echo Invalid command: %CMD%
+exit /b 1
+
+:install
+cd .theme && npm i && cd ..
+goto end
+
+:run
+echo (1) dev
+echo (2) local
+set /p choice="Please select 1-2: "
+
+if "%choice%"=="1" goto dev
+if "%choice%"=="2" goto local
+
+:dev
+cd .theme && npm run dev && cd ..
+goto end
+
+:local
+cd .theme && npm run local && cd ..
+goto end
+
+:build
+cd .theme && npm run generate:local && cd ..
+goto end
+
+:end
diff --git a/migrations.md b/migrations.md
index 1fd68c938..b56186f1a 100644
--- a/migrations.md
+++ b/migrations.md
@@ -54,6 +54,7 @@ Move this folder and components to under `/app` directory
final result must be look like this
+```bash
my-nuxt-app/
├─ app/
│ ├─ assets/
@@ -72,6 +73,7 @@ my-nuxt-app/
├─ shared/
├─ server/
└─ nuxt.config.ts
+```
### Editing `tsconfig.ts`
diff --git a/run.bat b/run.bat
deleted file mode 100644
index d45b9695a..000000000
--- a/run.bat
+++ /dev/null
@@ -1,17 +0,0 @@
-@echo off
-:BEGIN
-echo (1) Dev
-echo (2) Local
-CHOICE /N /C:12 /M "Pick mode"
-IF ERRORLEVEL == 2 GOTO Local
-IF ERRORLEVEL == 1 GOTO Dev
-GOTO END
-:Dev
-cd .theme
-npm run dev
-cd ..
-:Local
-cd .theme
-npm run local
-cd ..
-END: