commitizen / commitizen/cz-cli

Remove the dependency on global install

未关闭
#811 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
17.5k
派生
566
平均合并
8 小时 16 分钟
30 天内合并 PR
1

描述

This package seems to have a dependency on installing `commitizen` globally.

I followed the directions for installing commitizen locally to my project repo and ran:
`yarn add commitizen --dev` and omitted the `-g` flag.

`npx commitizen init cz-conventional-changelog --save-dev --save-exact` hangs and never finishes.

`npx cz` doesn't work, nor does adding
```
"scripts": {
"commit": "cz"
}
```
to `package.json`.

running `yarn commitizen init cz-conventional-changelog --yarn --dev --exact` then throws an error:
```
init (/Users/bkirk/base/coursera/cds/node_modules/commitizen/dist/commitizen/init.js:1017:28)
at Object.bootstrap (/Users/bkirk/base/coursera/cds/node_modules/commitizen/dist/cli/commitizen.js:34:30)
at Object. (/Users/bkirk/base/coursera/cds/node_modules/commitizen/bin/commitizen.js:2:38)
```

In brief, there appears to be an implicit dependency on having `commitizen` globally installed. It would make sense to have `commitizen` work locally for folks working across multiple projects, some which don't require `commitizen`.

Node: `v12.18.2`

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。