mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +08:00
chore: migrate frontend package manager from npm to pnpm
This commit is contained in:
@@ -21,11 +21,14 @@ jobs:
|
||||
with:
|
||||
node-version: '20.19.0'
|
||||
|
||||
- name: Install pnpm
|
||||
run: npm install -g pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install --legacy-peer-deps
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
run: pnpm run build
|
||||
|
||||
backend:
|
||||
name: Build Go Backend
|
||||
|
||||
@@ -22,10 +22,10 @@ FLVX — traffic forwarding panel: Go admin API + Vite/React UI + Go agent.
|
||||
(cd go-backend && go test ./...)
|
||||
|
||||
# Frontend
|
||||
(cd vite-frontend && npm install --legacy-peer-deps)
|
||||
(cd vite-frontend && npm run dev) # host 0.0.0.0:3000
|
||||
(cd vite-frontend && npm run build) # tsc && vite build
|
||||
(cd vite-frontend && npm run lint) # eslint --fix (no typecheck command)
|
||||
(cd vite-frontend && pnpm install)
|
||||
(cd vite-frontend && pnpm run dev) # host 0.0.0.0:3000
|
||||
(cd vite-frontend && pnpm run build) # tsc && vite build
|
||||
(cd vite-frontend && pnpm run lint) # eslint --fix (no typecheck command)
|
||||
|
||||
# Agent
|
||||
(cd go-gost && go run .)
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ python with_server.py --backend-port 8080 --frontend-port 5173 -- pytest -v
|
||||
# Custom server commands
|
||||
python with_server.py \
|
||||
--server "make run" --port 6365 --cwd go-backend \
|
||||
--server "npm run dev" --port 3000 --cwd vite-frontend \
|
||||
--server "pnpm run dev" --port 3000 --cwd vite-frontend \
|
||||
-- pytest -v
|
||||
```
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ Examples:
|
||||
# Custom server configuration
|
||||
python with_server.py \\
|
||||
--server "make run" --port 6365 --cwd go-backend \\
|
||||
--server "npm run dev" --port 3000 --cwd vite-frontend \\
|
||||
--server "pnpm run dev" --port 3000 --cwd vite-frontend \\
|
||||
-- pytest -v
|
||||
|
||||
# Use custom backend port
|
||||
@@ -302,7 +302,7 @@ def build_servers(args) -> list[ServerProcess]:
|
||||
|
||||
servers.append(
|
||||
ServerProcess(
|
||||
command="npm run dev",
|
||||
command="pnpm run dev",
|
||||
port=args.frontend_port,
|
||||
cwd=root / args.frontend_cwd,
|
||||
env=frontend_env,
|
||||
|
||||
@@ -24,7 +24,8 @@ dist-ssr
|
||||
*.sw?
|
||||
|
||||
|
||||
pnpm-lock.yaml
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
bun.lockb
|
||||
@@ -33,8 +33,8 @@ React dashboard for FLVX. rolldown-vite + TypeScript + Tailwind v4 + shadcn/radi
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
npm install --legacy-peer-deps
|
||||
npm run dev # http://0.0.0.0:3000
|
||||
npm run build # tsc && vite build
|
||||
npm run lint # eslint --fix
|
||||
pnpm install
|
||||
pnpm run dev # http://0.0.0.0:3000
|
||||
pnpm run build # tsc && vite build
|
||||
pnpm run lint # eslint --fix
|
||||
```
|
||||
|
||||
@@ -3,11 +3,11 @@ FROM node:20.19.0 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install --legacy-peer-deps
|
||||
COPY package.json pnpm-lock.yaml* ./
|
||||
RUN corepack enable pnpm && pnpm install --frozen-lockfile
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
RUN pnpm run build
|
||||
|
||||
# 生产阶段
|
||||
FROM nginx:stable-alpine AS production-stage
|
||||
|
||||
@@ -23,16 +23,16 @@ git clone https://github.com/frontio-ai/vite-template.git
|
||||
|
||||
### Install dependencies
|
||||
|
||||
You can use one of them `npm`, `yarn`, `pnpm`, `bun`, Example using `npm`:
|
||||
You can use one of them `npm`, `yarn`, `pnpm`, `bun`, Example using `pnpm`:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
pnpm install
|
||||
```
|
||||
|
||||
### Run the development server
|
||||
### Start development server
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
pnpm run dev
|
||||
```
|
||||
|
||||
### Setup pnpm (optional)
|
||||
|
||||
Generated
+8999
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user