read-package-json
Advanced tools
Comparing version 1.1.4 to 1.1.5
{ | ||
"name": "read-package-json", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", | ||
@@ -5,0 +5,0 @@ "description": "The thing npm uses to read package.json files with semantics and defaults and validation", |
@@ -22,2 +22,3 @@ // vim: set softtabstop=16 shiftwidth=16: | ||
serverjs, | ||
scriptpath, | ||
authors, | ||
@@ -129,2 +130,15 @@ readme, | ||
function scriptpath (file, data, cb) { | ||
if (!data.scripts) return cb(null, data); | ||
var k = Object.keys(data.scripts) | ||
k.forEach(scriptpath_, data.scripts) | ||
cb(null, data); | ||
} | ||
function scriptpath_(key) { | ||
s = this[key] | ||
var spre = /^(\.[\/\\])?node_modules[\/\\].bin[\\\/]/ | ||
if (s.match(spre)) | ||
this[key] = this[key].replace(spre, '') | ||
} | ||
function gypfile (file, data, cb) { | ||
@@ -131,0 +145,0 @@ var dir = path.dirname(file) |
@@ -28,3 +28,4 @@ // vim: set softtabstop=16 shiftwidth=16: | ||
devDependencies: { tap: '~0.2.5' }, | ||
optionalDependencies: { npmlog: '0', 'graceful-fs': '~1.1.8' }, | ||
homepage: "https://github.com/isaacs/read-package-json", | ||
optionalDependencies: { npmlog: '0', 'graceful-fs': '~1.1.8' }, | ||
_id: 'read-package-json@0.1.1', | ||
@@ -31,0 +32,0 @@ readme: 'ERROR: No README data found!' } |
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
26231
505