From ba88aeda9fd31a897d8fe9ccaf8f201f465a1caa Mon Sep 17 00:00:00 2001 From: Jason Jafari Date: Thu, 13 Jun 2024 23:22:25 -0400 Subject: [PATCH] Add husky --- .husky/pre-commit | 6 ++++++ package.json | 12 ++++++++++-- yarn.lock | 4 ++++ 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100755 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..57cf245 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,6 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npm run healthy-check +npm run increase-version +git add package.json \ No newline at end of file diff --git a/package.json b/package.json index 6c93b2a..458aca2 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,18 @@ { "name": "mlModelSaver", - "version": "1.0.1", + "version": "1.0.2", "description": "Make life easier for save and serving ml models", "main": "index.js", "repository": "git@github.com:smartdev-ca/mlModelSaver.git", "author": "Jason Jafari ", "license": "MIT", - "private": false + "private": false, + "dependencies": { + "husky": "^9.0.11" + }, + "scripts": { + "increase-version": "npm --force --no-git-tag-version version patch", + "healthy-check": "ls -la", + "prepare": "husky install" + } } diff --git a/yarn.lock b/yarn.lock index fb57ccd..99f190b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,3 +2,7 @@ # yarn lockfile v1 +husky@^9.0.11: + version "9.0.11" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.0.11.tgz#fc91df4c756050de41b3e478b2158b87c1e79af9" + integrity sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==