This repository contains the git hooks for Mixmax's development workflow. We use commitlint
to
reduce friction when using semantic-release
, and desire to tighten the feedback cycle to further
reduce friction.
$ npm i -D @mixmaxhq/git-hooks @commitlint/cli
The git hooks are opt-in using the global mixmax configuration file ~/.config/mixmax/config
:
[git.hooks]
commit_msg = true
pre_push = true
pre_push_mode = "all" # Valid values: "all", "unpushed"
(The syntax here is TOML.)
Copy this to a .huskyrc.js
file adjacent to the .git
and node_modules
directories of a
project:
module.exports = require('@mixmaxhq/git-hooks');
// Husky explicitly greps for the hook itself to determine whether to run the hook. Here are the
// hooks, to bypass this check:
//
// - pre-push
// - commit-msg
npm run build
Outputs a commonjs-compatible bundle to dist/index.js
.
npm test
Merging to master will automatically publish the package if commits with non-trivial changes have been introduced (per commit conventions).