From 2e43edd0f751c9a3875e994bc56f7eda08958160 Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Thu, 11 Jan 2018 11:51:11 +0800 Subject: [PATCH] Move build to predploy Avoid publish empty _site dir to github when `npm run site` was exited --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 39254e16cf..7db0b52148 100644 --- a/package.json +++ b/package.json @@ -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",