代码拉取完成,页面将自动刷新
cd `dirname $0`
# 判断是否安装了 Node
if ! type node >/dev/null 2>&1; then
echo "未检测到nodejs环境,尝试使用homebrew安装..."
# 检测homebrew是否存在
if ! type brew >/dev/null 2>&1; then
echo "未检测到homebrew,无法完成安装,请安装homebrew或直接安装nodejs"
else
brew install node
fi
fi
cd ..
echo "开始安装依赖..."
yarn install --registry=https://registry.npm.taobao.org
echo "依赖安装完成,启动程序..."
# 在浏览器中打开
open http://localhost:5173/
# 本地开启服务
npm run start
# 返回原始目录并退出
cd `dirname $0`
exit
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。