Files
SCGL/init-frontend.cmd

44 lines
944 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
REM ================================================
REM PMS 前端项目初始化脚本 (Windows)
REM ================================================
echo >>> 创建 Vue 3 + Vite + TypeScript 项目...
REM 检测包管理器
where pnpm >nul 2>&1
if %errorlevel%==0 (
set PKG=pnpm
) else (
where npm >nul 2>&1
if %errorlevel%==0 (
set PKG=npm
) else (
echo 未找到 pnpm 或 npm请先安装 Node.js
exit /b 1
)
)
echo >>> 使用: %PKG%
REM 初始化项目
%PKG% create vite@latest pms-frontend -- --template vue-ts
cd pms-frontend
REM 安装依赖
%PKG% install
REM 安装 Element Plus、Axios、Vue Router、Pinia、vuedraggable
%PKG% add element-plus @element-plus/icons-vue axios vue-router pinia vuedraggable@next
REM 安装类型定义
%PKG% add -D @types/node
echo.
echo >>> 项目初始化完成!
echo.
echo >>> 下一步:
echo cd pms-frontend
echo %PKG% run dev