Jenkins(一)前端构建代码
# 检查 node 版本
node -v
# 检查 npm 版本
npm -v
# 进入项目目录
cd ${project.path}
# 查看当前目录
ls
# 设置为新的镜像
npm config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass
# 设置 npm 的镜像源为 淘宝镜像源 为下面的yarn的安装加速
npm config set registry https://registry.npmmirror.com
# 查看是否设置成功
npm config get registry
# 清除依赖
npm cache clean --force
# 下载 yarn 和 lerna
npm install -g yarn lerna@6.0.0
# 忽略 yarn 版本不兼容的报错
# yarn config set ignore-engines true
# 设置为国内镜像 加速
yarn config set registry https://registry.npmmirror.com
下载依赖
yarn install
进入到对应的工程项目中
cd packages/system
打包
yarn run build:test
浙公网安备 33010602011771号