cz-cli
cz-cli copied to clipboard
Support yarn v2
Yarn v2 has a new directory structure that doesn't involve modules. eslint-plugin-import was able to solve an issue like this quite easily by using createRequireFromPath
instead of require.resolve
.
git-cz
cli works for me in yarn-2.0.0-rc.36
. below is my project setup.
Install
$ yarn add commitizen cz-lerna-changelog
package.json
{
"config": {
"commitizen": {
"path": "cz-lerna-changelog"
}
}
}
Script
$ yarn git-cz
I think the docs should probably be updated to reflect this, but here's my current config with the newest version of husky:
package.json
{
"config": {
"commitizen": {
"path": "cz-<your flavor>" // Notice the lack of ./node_modules
}
}
}
.husky/prepare-commit-msg
#!/bin/bash
exec < /dev/tty && yarn cz --hook || true # notice the lack of node_modules/.bin and instead using yarn
I would argue that if this is added to the docs, this issue should be closed.