init-package-json
Advanced tools
Comparing version 1.9.3 to 1.9.4
@@ -43,3 +43,3 @@ | ||
var package = path.resolve(dir, 'package.json') | ||
var packageFile = path.resolve(dir, 'package.json') | ||
input = path.resolve(input) | ||
@@ -53,3 +53,3 @@ var pkg | ||
}) | ||
readJson(package, function (er, d) { | ||
readJson(packageFile, function (er, d) { | ||
readJson.extraSet = es | ||
@@ -60,4 +60,4 @@ | ||
ctx.filename = package | ||
ctx.dirname = path.dirname(package) | ||
ctx.filename = packageFile | ||
ctx.dirname = path.dirname(packageFile) | ||
ctx.basename = path.basename(ctx.dirname) | ||
@@ -86,3 +86,3 @@ if (!pkg.version || !semver.valid(pkg.version)) | ||
}) | ||
readJson.extras(package, pkg, function (er, pkg) { | ||
readJson.extras(packageFile, pkg, function (er, pkg) { | ||
readJson.extraSet = es | ||
@@ -112,5 +112,5 @@ if (er) return cb(er, pkg) | ||
function write (yes) { | ||
fs.writeFile(package, d, 'utf8', function (er) { | ||
fs.writeFile(packageFile, d, 'utf8', function (er) { | ||
if (!er && yes && !config.get('silent')) { | ||
console.log('Wrote to %s:\n\n%s\n', package, d) | ||
console.log('Wrote to %s:\n\n%s\n', packageFile, d) | ||
} | ||
@@ -123,3 +123,3 @@ return cb(er, pkg) | ||
} | ||
console.log('About to write to %s:\n\n%s\n', package, d) | ||
console.log('About to write to %s:\n\n%s\n', packageFile, d) | ||
read({prompt:'Is this ok? ', default: 'yes'}, function (er, ok) { | ||
@@ -126,0 +126,0 @@ if (!ok || ok.toLowerCase().charAt(0) !== 'y') { |
{ | ||
"name": "init-package-json", | ||
"version": "1.9.3", | ||
"version": "1.9.4", | ||
"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
25384