diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..e501394 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn try diff --git a/package.json b/package.json index 5822466..f9f48e3 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "url": "https://github.com/fluid-framework/fluid/issues/" }, "scripts": { + "prepack": "husky install", "start": "npm-run-all -s watch", "watch": "node-sass ./src --output ./temp/ --output-style compact --indent-type space --indent-width 2 --source-map true -w", "try": "npm-run-all -s lint test", @@ -63,12 +64,13 @@ "cssnano": "^4.1.10", "find-unused-sass-variables": "^3.1.0", "foreach-cli": "^1.8.1", + "husky": "^6.0.0", "node-sass": "^5.0.0", "npm-run-all": "^4.1.5", - "rfs": "^9.0.3", "postcss": "^8.2.6", "postcss-cli": "^8.3.1", "postcss-combine-duplicated-selectors": "^10.0.2", + "rfs": "^9.0.3", "shx": "^0.3.3", "stylelint": "^13.9.0", "stylelint-config-recommended-scss": "^4.2.0", diff --git a/yarn.lock b/yarn.lock index b464fc5..d025094 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1704,6 +1704,11 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +husky@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/husky/-/husky-6.0.0.tgz#810f11869adf51604c32ea577edbc377d7f9319e" + integrity sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ== + ignore@^5.1.4, ignore@^5.1.8: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"