Skip to content

release-1.1.2-win32

Compare
Choose a tag to compare
@stuartZhang stuartZhang released this 22 Aug 05:09
· 14 commits to 开发基础版 since this release

给问题类型为

  1. "type": "string" 或
  2. "type": "input"

的输入项,添加一个新子类型 "subType": "packageName",以针对【包名】的文本输入做额外的验证判断处理。问卷配置例子:

{
    "name": {
        "type": "string",
        "subType": "packageName", // 这个配置项是新的
        "message": "工程名",
        "required": true,
        "default": "project_name"
    },
}

我是参考 npm 包validate-npm-package-name 的源码来实现的。