feat: initial commit and ignore qwen files
This commit is contained in:
37
init-frontend.sh
Normal file
37
init-frontend.sh
Normal file
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
# ================================================
|
||||
# PMS 前端项目初始化脚本
|
||||
# ================================================
|
||||
|
||||
echo ">>> 创建 Vue 3 + Vite + TypeScript 项目..."
|
||||
|
||||
# 使用 pnpm(推荐)或 npm
|
||||
if command -v pnpm &> /dev/null; then
|
||||
PACKAGE_MANAGER="pnpm"
|
||||
elif command -v yarn &> /dev/null; then
|
||||
PACKAGE_MANAGER="yarn"
|
||||
else
|
||||
PACKAGE_MANAGER="npm"
|
||||
fi
|
||||
|
||||
echo ">>> 使用: $PACKAGE_MANAGER"
|
||||
|
||||
# 初始化项目
|
||||
$PACKAGE_MANAGER create vite@latest pms-frontend -- --template vue-ts
|
||||
|
||||
cd pms-frontend
|
||||
|
||||
# 安装依赖
|
||||
$PACKAGE_MANAGER install
|
||||
|
||||
# 安装 Element Plus、Axios、Vue Router、Pinia、vuedraggable
|
||||
$PACKAGE_MANAGER add element-plus @element-plus/icons-vue axios vue-router pinia vuedraggable@next
|
||||
|
||||
# 安装类型定义
|
||||
$PACKAGE_MANAGER add -D @types/node
|
||||
|
||||
echo ">>> 项目初始化完成!"
|
||||
echo ""
|
||||
echo ">>> 下一步:"
|
||||
echo " cd pms-frontend"
|
||||
echo " $PACKAGE_MANAGER run dev"
|
||||
Reference in New Issue
Block a user