From 0b6ee85138c6d3ee581421a7416e71997415423d Mon Sep 17 00:00:00 2001 From: luoxue Date: Mon, 18 Nov 2019 10:59:51 +0800 Subject: [PATCH] feat(daasd): asdasd asdasd --- commit/lib/cz/engine.js | 6 ++++-- commit/lib/cz/index.js | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/commit/lib/cz/engine.js b/commit/lib/cz/engine.js index f4e0909e..84e9b5ea 100644 --- a/commit/lib/cz/engine.js +++ b/commit/lib/cz/engine.js @@ -10,7 +10,7 @@ const filter = (array) => { return x; }); }; - + // 获取选择列表 const getList = (obj) => { const objLeng = longest(Object.keys(obj)).length * 2 + 1; @@ -37,7 +37,9 @@ module.exports = function (options) { }, { type: 'input', name: 'scope', - message: '本次提交的改变所影响的范围? (按 enter 键跳过)\n', + required: true, + pattern: /^\w+$/, + // message: '本次提交的改变所影响的范围?', }, { type: 'input', name: 'subject', diff --git a/commit/lib/cz/index.js b/commit/lib/cz/index.js index 44fc6609..e9a6f756 100644 --- a/commit/lib/cz/index.js +++ b/commit/lib/cz/index.js @@ -46,25 +46,25 @@ module.exports = engine({ } }, scopes: { - 整个项目: { + global: { description: '影响整个项目', title: 'global' }, - 视图层: { + ui: { description: 'UI 界面', title: 'ui' }, - 数据层: { + data: { description: '数据变化', title: 'data' }, - 公共模块: { + component: { description: '影响公共组件使用', title: 'component' }, - 未知: { + unknown: { description: '不知道影响范围', - title: 'component' + title: 'unknown' } } });