init-package-json
Advanced tools
Comparing version 1.10.0 to 1.10.1
@@ -18,6 +18,2 @@ var fs = require('fs') | ||
function conf (name) { | ||
return config.get(name) || config.get(name.split('.').join('-')) | ||
} | ||
function readDeps (test, excluded) { return function (cb) { | ||
@@ -43,3 +39,3 @@ fs.readdir('node_modules', function (er, dir) { | ||
} | ||
deps[d] = conf('save.exact') ? p.version : conf('save.prefix') + p.version | ||
deps[d] = config.get('save-exact') ? p.version : config.get('save-prefix') + p.version | ||
return next() | ||
@@ -56,3 +52,3 @@ }) | ||
var spec = npa(name) | ||
var scope = conf('scope') | ||
var scope = config.get('scope') | ||
if (scope) { | ||
@@ -75,3 +71,6 @@ if (scope.charAt(0) !== '@') scope = '@' + scope | ||
var version = package.version || conf('init.version') || '1.0.0' | ||
var version = package.version || | ||
config.get('init.version') || | ||
config.get('init-version') || | ||
'1.0.0' | ||
exports.version = yes ? | ||
@@ -220,11 +219,19 @@ version : | ||
if (!package.author) { | ||
var a = conf('init.author.name') | ||
exports.author = a ? { | ||
"name": a, | ||
"email": conf('init.author.email'), | ||
"url": conf('init.author.url') | ||
} : yes ? '' : prompt('author') | ||
exports.author = config.get('init.author.name') || | ||
config.get('init-author-name') | ||
? { | ||
"name" : config.get('init.author.name') || | ||
config.get('init-author-name'), | ||
"email" : config.get('init.author.email') || | ||
config.get('init-author-email'), | ||
"url" : config.get('init.author.url') || | ||
config.get('init-author-url') | ||
} | ||
: yes ? '' : prompt('author') | ||
} | ||
var license = package.license || conf('init.license') || 'ISC' | ||
var license = package.license || | ||
config.get('init.license') || | ||
config.get('init-license') || | ||
'ISC' | ||
exports.license = yes ? license : prompt('license', license, function (data) { | ||
@@ -231,0 +238,0 @@ var its = validateLicense(data) |
{ | ||
"name": "init-package-json", | ||
"version": "1.10.0", | ||
"version": "1.10.1", | ||
"main": "init-package-json.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
14128
349