#! /bin/bash

npm install -g yarn -registry=https://registry.npm.taobao.org

yarn -v

yarn install --pure-lockfile

yarn build -api production

cd dist tar -zcvf dist.tar.gz *

cp ./dist.tar.gz /root/dist

cd /root/dist rm -rf `ls | grep -v "dist.tar.gz"`

tar zxvf dist.tar.gz