diff --git a/.czrc b/.czrc new file mode 100644 index 0000000..fa0f35b --- /dev/null +++ b/.czrc @@ -0,0 +1,3 @@ +{ + "path": "./node_modules/cz-conventional-changelog" +} diff --git a/.husky/commit-msg b/.husky/commit-msg index 9dcdbc2..34eed8b 100644 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname -- "$0")/_/husky.sh" - -npx --no -- commitlint --edit ${1} +npx --no -- commitlint --edit $1 \ No newline at end of file diff --git a/package.json b/package.json index 7a98696..49e9ef0 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,11 @@ "copy": "npx cap copy", "update": "npx cap update", "sync": "npx cap sync", - "prepare": "husky" + "prepare": "husky", + "pre-commit": "cz" + }, + "hooks": { + "prepare-commit-msg": "exec < /dev/tty && npx cz --hook || true" }, "dependencies": { "@capacitor-community/admob": "^6.1.0", @@ -33,6 +37,7 @@ "@commitlint/config-conventional": "^19.6.0", "babel-plugin-transform-remove-console": "^6.9.4", "core-js": "^3.39.0", + "cz-conventional-changelog": "^3.3.0", "husky": "^9.1.7", "typescript": "^5.7.2", "vite": "^5.4.2",