Removing a wrong validation check

`bin` property of package.json must point to a binary that will
be copied by NPM into the NPM Installation's bin directory. This check
was assuming users would point to a directory containing the binary and
not the binary itself
This commit is contained in:
Sanath Kumar Ramesh
2017-08-10 17:48:12 -07:00
parent 5c337e9e48
commit 5c19b1b1f9
3 changed files with 2 additions and 6 deletions

View File

@@ -7,7 +7,7 @@
"install": "go-npm"
},
"bin": {
"myBinaryName": "./bin"
"anyCommandNameYouLike": "./bin/myBinaryName"
},
"goBinary": {
"name": "myBinaryName",

View File

@@ -55,10 +55,6 @@ function validateConfiguration(packageJson) {
if (!packageJson.bin || typeof(packageJson.bin) !== "object") {
return "'bin' property of package.json must be defined and be an object";
}
if (packageJson.goBinary.path !== packageJson.bin[packageJson.goBinary.name]) {
return "'bin' property must be a map from 'name' to 'path'. This is necessary for NPM Global install to work";
}
}
/**

View File

@@ -1,6 +1,6 @@
{
"name": "go-npm",
"version": "0.1.1",
"version": "0.1.2",
"description": "Distribute and install Go binaries via NPM",
"main": "index.js",
"bin": "index.js",