link-parent-bin
Advanced tools
Comparing version 0.1.3 to 0.2.0
{ | ||
"name": "link-parent-bin", | ||
"version": "0.1.3", | ||
"version": "0.2.0", | ||
"description": "", | ||
@@ -10,2 +10,6 @@ "main": "src/ParentBinLinker.js", | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/nicojs/node-link-parent-bin.git" | ||
}, | ||
"scripts": { | ||
@@ -21,3 +25,7 @@ "clean": "node tasks/clean.js", | ||
"preversion": "npm test", | ||
"version": "conventional-changelog -r 0 > changelog.md" | ||
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md", | ||
"postversion": "npm publish && git push && git push --tags", | ||
"release:patch": "npm version patch -m \"chore(release): %s\"", | ||
"release:minor": "npm version minor -m \"chore(release): %s\"", | ||
"release:major": "npm version major -m \"chore(release): %s\"" | ||
}, | ||
@@ -40,2 +48,3 @@ "keywords": [], | ||
"chai-as-promised": "^6.0.0", | ||
"conventional-changelog-cli": "^1.3.22", | ||
"install-local": "^0.3.1", | ||
@@ -42,0 +51,0 @@ "mocha": "^3.2.0", |
@@ -6,3 +6,4 @@ import { Options } from './program'; | ||
export interface PackageJson { | ||
bin?: Dictionary; | ||
name?: string; | ||
bin?: Dictionary | string; | ||
devDependencies?: Dictionary; | ||
@@ -19,2 +20,3 @@ dependencies?: Dictionary; | ||
linkBinsToChildren(): Promise<any>; | ||
private binariesFrom(pkg); | ||
} |
@@ -31,4 +31,5 @@ "use strict"; | ||
if (pkg.bin) { | ||
return Promise.all(Object.keys(pkg.bin).map(function (bin) { return Promise.all(childPackages.map(function (childPackage) { | ||
return _this.linkBin(bin, path.resolve(moduleDir, pkg.bin[bin]), childPackage) | ||
var binaries_1 = _this.binariesFrom(pkg); | ||
return Promise.all(Object.keys(binaries_1).map(function (bin) { return Promise.all(childPackages.map(function (childPackage) { | ||
return _this.linkBin(bin, path.resolve(moduleDir, binaries_1[bin]), childPackage) | ||
.catch(function (err) { return _this.log.error("Could not link bin " + bin + " for child " + childPackage + ".", err); }); | ||
@@ -64,2 +65,8 @@ })); })); | ||
}; | ||
ParentBinLinker.prototype.binariesFrom = function (pkg) { | ||
var isString = function (val) { return typeof val === 'string'; }; | ||
return isString(pkg.bin) | ||
? (_a = {}, _a[pkg.name] = pkg.bin, _a) : pkg.bin; | ||
var _a; | ||
}; | ||
return ParentBinLinker; | ||
@@ -66,0 +73,0 @@ }()); |
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
16346
230
1
1
0
19