chore(frontend): switch from pnpm to npm
This commit is contained in:
parent
1adb26e8b8
commit
a89a5b3494
8 changed files with 6369 additions and 4249 deletions
|
@ -3,12 +3,8 @@
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"name": "run-prettier",
|
"name": "run-prettier",
|
||||||
"command": "pnpm",
|
"command": "npx",
|
||||||
"args": [
|
"args": ["prettier", "-w", "${staged}"],
|
||||||
"prettier",
|
|
||||||
"-w",
|
|
||||||
"${staged}"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"Foxnouns.Frontend/**/*.ts",
|
"Foxnouns.Frontend/**/*.ts",
|
||||||
"Foxnouns.Frontend/**/*.json",
|
"Foxnouns.Frontend/**/*.json",
|
||||||
|
@ -22,13 +18,8 @@
|
||||||
{
|
{
|
||||||
"name": "run-csharpier",
|
"name": "run-csharpier",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"args": [
|
"args": ["csharpier", "${staged}"],
|
||||||
"csharpier",
|
"include": ["**/*.cs"]
|
||||||
"${staged}"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"**/*.cs"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
FROM docker.io/node:23-slim
|
FROM docker.io/node:23-slim
|
||||||
|
|
||||||
ENV PNPM_HOME="/pnpm"
|
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
|
||||||
RUN corepack enable
|
|
||||||
|
|
||||||
COPY ./Foxnouns.Frontend /app
|
COPY ./Foxnouns.Frontend /app
|
||||||
COPY ./docker/frontend.env /app/.env.local
|
COPY ./docker/frontend.env /app/.env.local
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
@ -11,7 +7,7 @@ WORKDIR /app
|
||||||
ENV PRIVATE_API_HOST=http://rate:5003/api
|
ENV PRIVATE_API_HOST=http://rate:5003/api
|
||||||
ENV PRIVATE_INTERNAL_API_HOST=http://backend:5000/api
|
ENV PRIVATE_INTERNAL_API_HOST=http://backend:5000/api
|
||||||
|
|
||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
RUN npm ci
|
||||||
RUN pnpm run build
|
RUN npm run build
|
||||||
|
|
||||||
CMD ["pnpm", "node", "build/index.js"]
|
CMD ["node", "build/index.js"]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// This script regenerates the list of icons for the frontend (Foxnouns.Frontend/src/lib/icons.ts)
|
// This script regenerates the list of icons for the frontend (Foxnouns.Frontend/src/lib/icons.ts)
|
||||||
// and the backend (Foxnouns.Backend/Utils/BootstrapIcons.Icons.cs) from the currently installed version of Bootstrap Icons.
|
// and the backend (Foxnouns.Backend/Utils/BootstrapIcons.Icons.cs) from the currently installed version of Bootstrap Icons.
|
||||||
// Run with `pnpm node icons.js` in the frontend directory.
|
// Run with `node icons.js` in the frontend directory.
|
||||||
|
|
||||||
import { writeFileSync } from "fs";
|
import { writeFileSync } from "fs";
|
||||||
import icons from "bootstrap-icons/font/bootstrap-icons.json" with { type: "json" };
|
import icons from "bootstrap-icons/font/bootstrap-icons.json" with { type: "json" };
|
||||||
|
|
6354
Foxnouns.Frontend/package-lock.json
generated
Normal file
6354
Foxnouns.Frontend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -38,7 +38,6 @@
|
||||||
"typescript-eslint": "^8.29.0",
|
"typescript-eslint": "^8.29.0",
|
||||||
"vite": "^6.2.5"
|
"vite": "^6.2.5"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.15.0+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/firago": "^5.2.5",
|
"@fontsource/firago": "^5.2.5",
|
||||||
"@sentry/sveltekit": "^9.11.0",
|
"@sentry/sveltekit": "^9.11.0",
|
||||||
|
|
4219
Foxnouns.Frontend/pnpm-lock.yaml
generated
4219
Foxnouns.Frontend/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
8
build.sh
8
build.sh
|
@ -25,12 +25,12 @@ echo "Building Node.js frontend"
|
||||||
|
|
||||||
cd "$ROOT_DIR/Foxnouns.Frontend"
|
cd "$ROOT_DIR/Foxnouns.Frontend"
|
||||||
[ -d "$ROOT_DIR/Foxnouns.Frontend/build" ] && rm -r "$ROOT_DIR/Foxnouns.Frontend/build"
|
[ -d "$ROOT_DIR/Foxnouns.Frontend/build" ] && rm -r "$ROOT_DIR/Foxnouns.Frontend/build"
|
||||||
pnpm install
|
npm ci
|
||||||
pnpm build
|
npm run build
|
||||||
|
|
||||||
mkdir "$ROOT_DIR/build/fe"
|
mkdir "$ROOT_DIR/build/fe"
|
||||||
cp -r build .env* package.json pnpm-lock.yaml "$ROOT_DIR/build/fe"
|
cp -r build .env* package.json package-lock.json "$ROOT_DIR/build/fe"
|
||||||
cd "$ROOT_DIR/build/fe"
|
cd "$ROOT_DIR/build/fe"
|
||||||
pnpm install -P
|
NODE_ENV=production npm ci
|
||||||
|
|
||||||
echo "Finished building Foxnouns.NET"
|
echo "Finished building Foxnouns.NET"
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"watch:be": "dotnet watch --no-hot-reload --project Foxnouns.Backend -- --migrate-and-start",
|
"watch:be": "dotnet watch --no-hot-reload --project Foxnouns.Backend -- --migrate-and-start",
|
||||||
"dev": "concurrently -n .net,node,rate -c magenta,yellow,blue -i 'pnpm watch:be' 'cd Foxnouns.Frontend && pnpm dev' 'cd rate && go run -v .'",
|
"dev": "concurrently -n .net,node,rate -c magenta,yellow,blue -i 'npm run watch:be' 'cd Foxnouns.Frontend && npm run dev' 'cd rate && go run -v .'",
|
||||||
"format": "dotnet csharpier . && cd Foxnouns.Frontend && pnpm format"
|
"format": "dotnet csharpier . && cd Foxnouns.Frontend && npm run format"
|
||||||
},
|
}
|
||||||
"packageManager": "pnpm@9.15.0+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c"
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue