diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..449fcde --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npm test diff --git a/package.json b/package.json index 11c1819..0f98cc7 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,8 @@ "coverage": "nyc ava", "coveralls": "nyc ava && nyc report --reporter=lcov && cat coverage/lcov.info | coveralls", "standard-fix": "standard --fix", - "refresh": "rm -rf node_modules && rm package-lock.json && npm install" + "refresh": "rm -rf node_modules && rm package-lock.json && npm install", + "prepare": "husky install" }, "keywords": [ "bigfive", @@ -57,10 +58,5 @@ }, "dependencies": { "knuth-shuffle": "1.0.8" - }, - "husky": { - "hooks": { - "pre-commit": "npm test" - } } }