init-package-json
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -170,7 +170,7 @@ var fs = require('fs') | ||
if (!package.author) { | ||
exports.author = config['init.author.name'] | ||
exports.author = config.get('init.author.name') | ||
? { | ||
"name" : config['init.author.name'], | ||
"email" : config['init.author.email'], | ||
"url" : config['init.author.url'] | ||
"name" : config.get('init.author.name'), | ||
"email" : config.get('init.author.email'), | ||
"url" : config.get('init.author.url') | ||
} | ||
@@ -177,0 +177,0 @@ : prompt('author') |
@@ -20,2 +20,17 @@ | ||
cb = config, config = {} | ||
// accept either a plain-jane object, or a config object | ||
// with a "get" method. | ||
if (typeof config.get !== 'function') { | ||
var data = config | ||
config = { | ||
get: function (k) { | ||
return data[k] | ||
}, | ||
toJSON: function () { | ||
return data | ||
} | ||
} | ||
} | ||
var package = path.resolve(dir, 'package.json') | ||
@@ -22,0 +37,0 @@ input = path.resolve(input) |
{ | ||
"name": "init-package-json", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"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
11828
303