build.sh 388 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/bash

set -e

WORKING_PATH=`pwd`
DIST_DIR='dist'
DIST_PATH="$WORKING_PATH/$DIST_DIR"

# generate dist
rm -rf $DIST_PATH
mkdir -p $DIST_PATH

yarn
P
Peter Pan 已提交
14 15 16
# export
# WARNING: export FIRST!!! dist files will be deleted by next after export
yarn export
17 18 19 20 21 22 23 24
# next build
yarn build:next
# server build
yarn build:server

# move static files
cp next.config.js $DIST_PATH
cp package.json $DIST_PATH