PluginRegistry
Table of Contents
Methods
Gets a registry with a specified name. If one with this name does not exist, a new one is created (multiton pattern).
Parameters:
-
registryName
Stringoptional
Returns:
isAbsolutePath
-
pathToTest
isAbsolutePath is necessary because path.isAbsolute()
is not available on NodeJs 0.10.x
Parameters:
-
pathToTest
String
Returns:
true is pathToTest is absolute
parsePluginDefinition
-
pluginDefinition
-
context
This is the core functionality of this package.
If pluginDefinition
is a string, a plugin with this as the name is assumed.
Otherwise, pluginDefinition
should be an object, with a name
property.
This may also specify an optional requirePath
property,
which must be an absolute path.
Otherwise, this guesses the requirePath
by looking at the following possible locations:
- Tool's own dependencies
- Project's own dependencies
- Sibling of tool (at folder level) --> This is useful when tool is installed globally
Parameters:
-
pluginDefinition
String | Object -
context
Object
Returns:
reset
()
Forgets all registries and their plugins