dn-middleware-pkginfo
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -24,2 +24,4 @@ const fs = require('fs'); | ||
} | ||
const prefix = opts && opts.prefix || ''; | ||
const defaultPkgName = prefix + path.basename(this.cwd); | ||
@@ -29,6 +31,7 @@ opts.items = opts.items || [{ | ||
type: 'input', | ||
default: path.basename(this.cwd), | ||
default: defaultPkgName, | ||
message: '请输入项目名称', | ||
validate: function (name) { | ||
return !!name; | ||
const reg = new RegExp('^' + prefix); | ||
return reg.test(name); | ||
} | ||
@@ -35,0 +38,0 @@ }, { |
{ | ||
"name": "dn-middleware-pkginfo", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "用于根据用户输入配置 package 中的信息", | ||
@@ -11,2 +11,2 @@ "main": "./lib/index.js", | ||
"license": "ISC" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3271
66