From eaa9a64575f0db3540d0f1bcc7d16b0a4f250569 Mon Sep 17 00:00:00 2001 From: Arthur Ming Date: Tue, 6 Apr 2021 14:33:09 +0800 Subject: [PATCH] build: install husky in `prepare` script instead of `postinstall` With typicode/husky#890, the recommended way to install husky is in the `prepare` script instead of the `postinstall`. This commit moves the husky installation to the `prepare` script to align with the new recommendation. --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bf10812a9d92..88b111810837 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "yarn": ">= 1.0.0" }, "scripts": { - "postinstall": "husky install && node tools/postinstall/apply-patches.js && ngcc --properties module main --create-ivy-entry-points && node tools/postinstall/update-ngcc-main-fields.js", + "postinstall": "node tools/postinstall/apply-patches.js && ngcc --properties module main --create-ivy-entry-points && node tools/postinstall/update-ngcc-main-fields.js", "build": "node ./scripts/build-packages-dist.js", "build-docs-content": "node ./scripts/build-docs-content.js", "dev-app": "ibazel run //src/dev-app:devserver", @@ -48,7 +48,8 @@ "integration-tests:size-test": "bazel test //integration/size-test/...", "check-mdc-tests": "ts-node --project scripts/tsconfig.json scripts/check-mdc-tests.ts", "check-mdc-exports": "ts-node --project scripts/tsconfig.json scripts/check-mdc-exports.ts", - "check-tools": "yarn tsc --project tools/tsconfig-ci.json" + "check-tools": "yarn tsc --project tools/tsconfig-ci.json", + "prepare": "husky install" }, "version": "12.0.0-next.5", "dependencies": {