#!/bin/bash

set -x # -e

rm -rf package-lock.json

npm cache clean --force
# npm install --fetch-timeout=600000 --prefer-offline # 增加网络超时时间
npm config set registry https://registry.npmmirror.com 

echo "Running npm install with $(npm --version) at $(which npm)"
npm install && npm run build

echo "执行完成build命令"


echo "准备执行curl"
# curl "<%http%>/api/web/buildComplete?name=<%productname%>"
echo "执行完成 curl"

