"deploy:prep": "gulp deploy:prep",
"deploy:docs": "gulp deploy:docs",
"deploy:beta": "gulp deploy:beta",
- "precommit": "npm test",
- "prepush": "npm test"
+ "precommit": "./script/husky-precommit",
+ "prepush": "./script/husky-prepush"
},
"dependencies": {
"jquery": ">=3.0.0",
--- /dev/null
+#!/bin/bash
+
+{
+ echo -e "\033[33m🐶 Checking tests before committing with Husky...\033[0m" &&
+ npm run test &&
+ echo -e "\033[33m🐶 ✓ Tests run well, we can commit...\033[0m"
+} || {
+ echo -e "\033[33m🐶 ✗ Tests are failing, please fix them before committing.\033[0m"
+ exit 1
+}
--- /dev/null
+#!/bin/bash
+
+{
+ echo -e "\033[33m🐶 Checking tests before pushing with Husky...\033[0m" &&
+ npm run test &&
+ echo -e "\033[33m🐶 ✓ Tests run well, we can push...\033[0m"
+} || {
+ echo -e "\033[33m🐶 ✗ Tests are failing, please fix them before pushing.\033[0m"
+ exit 1
+}