Skip to content

Commit

Permalink
Merge pull request #5 from rhinel/dev
Browse files Browse the repository at this point in the history
fix: 修复code错误
  • Loading branch information
rhinel authored Mar 17, 2019
2 parents 0be107f + 5ffc57b commit e74063f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
Status:
[![Build Status](https://travis-ci.org/rhinel/cz-conventional-changelog-chinese.svg?branch=master)](https://travis-ci.org/rhinel/cz-conventional-changelog-chinese)
[![npm](https://img.shields.io/npm/v/cz-conventional-changelog-chinese.svg?style=plastic)](https://www.npmjs.com/package/cz-conventional-changelog-chinese)
[![npm](https://img.shields.io/npm/dm/cz-conventional-changelog-chinese.svg?style=plastic)](https://www.npmjs.com/package/cz-conventional-changelog-chinese)
[![npm](https://img.shields.io/npm/l/cz-conventional-changelog-chinese.svg?style=plastic)](https://www.npmjs.com/package/cz-conventional-changelog-chinese)
[![npm](https://img.shields.io/npm/v/cz-conventional-changelog-chinese.svg?style=flat)](https://www.npmjs.com/package/cz-conventional-changelog-chinese)
[![npm](https://img.shields.io/npm/dm/cz-conventional-changelog-chinese.svg?style=flat)](https://www.npmjs.com/package/cz-conventional-changelog-chinese)
[![npm](https://img.shields.io/npm/l/cz-conventional-changelog-chinese.svg?style=flat)](https://www.npmjs.com/package/cz-conventional-changelog-chinese)
22 changes: 11 additions & 11 deletions conventional-commit-types.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
{
"types": {
"功能": {
"feat": {
"description": "一个新的功能提交",
"title": "功能"
},
"修复": {
"fix": {
"description": "一次修复错误的提交",
"title": "修复"
},
"文档": {
"docs": {
"description": "只是文档/注释的修改提交",
"title": "文档"
},
"格式": {
"style": {
"description": "不影响代码含义的修改提交 (空格, 格式化, 缺少的分号, 等等)",
"title": "格式"
},
"重构": {
"refactor": {
"description": "既不修复错误也不添加功能的代码更改提交",
"title": "重构"
},
"优化": {
"perf": {
"description": "可以提高性能的代码更改提交",
"title": "优化"
},
"测试": {
"test": {
"description": "添加缺失测试或更正现有测试的更改提交",
"title": "测试"
},
"构建": {
"build": {
"description": "影响构建系统或外部依赖项的更改提交 (例如: webpack, test, npm, 等等)",
"title": "构建"
},
"流水线": {
"ci": {
"description": "CI配置文件和脚本的更改提交 (例如: 神兵, git hooks, Travis, Circle, BrowserStack, SauceLabs, 等等)",
"title": "流水线"
},
"杂项": {
"chore": {
"description": "其他不修改src或测试文件的更改提交",
"title": "杂项"
},
"恢复": {
"revert": {
"description": "恢复以前的代码的更改提交",
"title": "恢复"
}
Expand Down
4 changes: 2 additions & 2 deletions engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ module.exports = function (options) {

var types = options.types;

var length = longest(Object.keys(types)).length + 1;
var length = longest(Object.values(types).map(_ => _.title)).length + 1;
var choices = map(types, function (type, key) {
return {
name: rightPad(key + ':', length) + ' ' + type.description,
name: rightPad(type.title + ':', length) + ' ' + type.description,
value: key
};
});
Expand Down

0 comments on commit e74063f

Please sign in to comment.