Move build to predploy

Avoid publish empty _site dir to github when `npm run site` was exited
This commit is contained in:
Wei Zhu 2018-01-11 11:51:11 +08:00
parent 4d393dcc38
commit 2e43edd0f7

View File

@ -185,7 +185,8 @@
"start": "rimraf _site && node ./scripts/generateColorLess.js && cross-env NODE_ENV=development bisheng start -c ./site/bisheng.config.js",
"start:preact": "node ./scripts/generateColorLess.js && cross-env NODE_ENV=development REACT_ENV=preact bisheng start -c ./site/bisheng.config.js",
"site": "cross-env NODE_ENV=production bisheng build --ssr -c ./site/bisheng.config.js && node ./scripts/generateColorLess.js",
"deploy": "antd-tools run clean && npm run site && bisheng gh-pages --push-only",
"predeploy": "antd-tools run clean && npm run site",
"deploy": "bisheng gh-pages --push-only",
"pub": "antd-tools run pub",
"prepublish": "antd-tools run guard",
"pre-publish": "npm run test-all && node ./scripts/prepub",