Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .theme/app/app.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<NuxtLayout name="default">
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</template>
Expand All @@ -17,4 +17,4 @@ useHead({
}
]
});
</script>
</script>
7 changes: 3 additions & 4 deletions .theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
},
Expand Down
17 changes: 5 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
12 changes: 5 additions & 7 deletions build-and-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
17 changes: 0 additions & 17 deletions build.bat

This file was deleted.

46 changes: 46 additions & 0 deletions make.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@REM Generated By GPT
@REM Modified By CD
@echo off
setlocal enabledelayedexpansion

if "%1"=="" (
echo Usage: %0 ^<command^>
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
Comment thread
SeferMirza marked this conversation as resolved.

:build
cd .theme && npm run generate:local && cd ..
goto end

:end
2 changes: 2 additions & 0 deletions migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -72,6 +73,7 @@ my-nuxt-app/
├─ shared/
├─ server/
└─ nuxt.config.ts
```

### Editing `tsconfig.ts`

Expand Down
17 changes: 0 additions & 17 deletions run.bat

This file was deleted.