packages/taskr/lib/plugins.js
function getDependencies(pkg) {
	if (!pkg) {
		return [];
	}

	if (!isObject(pkg)) {
		$.error('Content from `package.json` must be an `Object`!');
		return [];
	}

	// get all possible dependencies
	const deps = [
		'dependencies', 'devDependencies', 'peerDependencies'
	].filter(key => pkg[key] !== void 0).map(k => Object.keys(pkg[k]));

	return flatten(deps);
}
function getDependencies(pkg) {
	if (!pkg) {
		return [];
	}

	if (!isObject(pkg)) {
		$.error('Content from `package.json` must be an `Object`!');
		return [];
	}

	// get all possible dependencies
	const deps = [
		'dependencies', 'devDependencies', 'peerDependencies'
	].filter(key => pkg[key] !== void 0).map(k => Object.keys(pkg[k]));

	return flatten(deps);
}
function getDependencies ( pkg ) { if ( ! pkg ) { return [ ] ; } if ( ! isObject ( pkg ) ) { $ . error ( 'Content from `package.json` must be an `Object`!' ) ; return [ ] ; } // get all possible dependencies const deps = [ 'dependencies' , 'devDependencies' , 'peerDependencies' ] . filter ( key => pkg [ key ] !== void 0 ) . map ( k => Object . keys ( pkg [ k ] ) ) ; return flatten ( deps ) ; }
Find a sibling `package.json` file & return its contents.
@param  {Object} file  A `package.json` contents as JSON
@return {Array}        The names of all dependencies, flattened
Find a sibling package . json file & return its contents .