Global

Methods

firstDefinedProperty(props) → {function}

Find and return the first defined property from within the list of provided properties from the object later provided.
Parameters:
Name Type Description
props Array.<String> The properties to check if they are defined
Source:
Returns:
A method that will return the first defined property from the object provided
Type
function

generateDeclaredDependenciesGraph(opts) → {Promise.<DependencyGraph>}

An asynchronous function that will prepare and return a dependency graph representing the inter-dependencies within the project at the path provided.
Parameters:
Name Type Description
opts Object The project and package manager configuration object
Properties
Name Type Description
projectPath String The full path to the project
packageManager String The package manger used in the project
Source:
Returns:
A dependency graph describing the inter-dependencies within the project
Type
Promise.<DependencyGraph>

generateImportedDependenciesGraph(opts, entryPath) → {Promise.<DependencyGraph>}

An asynchronous function that will prepare and return a dependency graph representing the runtime dependencies within the project at the path provided.
Parameters:
Name Type Description
opts Object The project configuration object
Properties
Name Type Description
projectPath String The full path to the project
entryPath String The path to the application root relative from the project root
Source:
Returns:
A dependency graph listing the runtime dependencies within the project
Type
Promise.<DependencyGraph>

listDirectoryChildren(directoryPath) → {Array.<String>}

Scan and retrieve a list of fully qualified paths for the children of the directory at the path provided.
Parameters:
Name Type Description
directoryPath String The full path to the directory to scan
Source:
Returns:
A list of fully qualified paths for the children of the directory at the path provided
Type
Array.<String>

listInstalledDependencies(opts) → {Promise.<Array.<String>>}

Scan the relevant dependencies directory, depending on which package manager has been declared, and return a list of the installed dependencies.
Parameters:
Name Type Description
opts Object The project and package manager configuration object
Properties
Name Type Description
projectPath String The full path to the project
packageManager String The package manger used in the project
Source:
Returns:
A list of installed dependencies
Type
Promise.<Array.<String>>

pruneVersionString(version) → {String}

Prune any preceeding text from a version identifier, commonly found in Bower declaration files, and return the true version.
Parameters:
Name Type Description
version String The version string to parse
Source:
Returns:
The true version from the string provided
Type
String

readDependenciesJson(opts) → {Promise.<DependencyJson>}

Read and parse the JSON file for the dependency located at the path provided.
Parameters:
Name Type Description
opts Object The project and package manager configuration object
Properties
Name Type Description
projectPath String The full path to the project
packageManager String The package manger used in the project
Source:
Returns:
The dependency JSON
Type
Promise.<DependencyJson>

toObjectBy(method) → {function}

A curried method to generate an indexed object from an array of strings. This method will execute the function passed with the string found at each position in the array provided upon final execution, and map the returned value to the key in the final object with the relevant string.
Parameters:
Name Type Description
method function The function with which to create the objects values
Source:
Returns:
A method that will return a new object whos values are equated from the method provided
Type
function