move postinstall to setup

This commit is contained in:
chenxsan 2021-02-22 18:46:16 +08:00
parent 7ca514c224
commit 315841d5dd
2 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,6 @@
"type-report": "rimraf coverage && yarn cover:types && yarn cover:report && open-cli coverage/lcov-report/index.html",
"pretest": "yarn lint",
"prelint": "yarn setup",
"postinstall": "husky install",
"lint": "yarn code-lint && yarn special-lint && yarn type-lint && yarn typings-lint && yarn yarn-lint && yarn pretty-lint && yarn spellcheck",
"code-lint": "eslint . --ext '.js' --cache",
"type-lint": "tsc",

View File

@ -29,7 +29,8 @@ function setup() {
function runSetupAsync() {
return exec("yarn", ["install"], "Install dependencies")
.then(() => exec("yarn", ["link"], "Create webpack symlink"))
.then(() => exec("yarn", ["link", "webpack"], "Link webpack into itself"));
.then(() => exec("yarn", ["link", "webpack"], "Link webpack into itself"))
.then(() => exec("yarn", ["run", "husky", "install"]));
}
function checkSymlinkExistsAsync() {