Show:
Module: PluginRegistry

Methods

get
(
  • registryName
)
PluginRegistryFluentInterface

Defined in index.js:162

Gets a registry with a specified name. If one with this name does not exist, a new one is created (multiton pattern).

Parameters:

  • registryName String

    optional

isAbsolutePath
(
  • pathToTest
)
Boolean
private

Defined in index.js:16

isAbsolutePath is necessary because path.isAbsolute() is not available on NodeJs 0.10.x

Parameters:

  • pathToTest String

Returns:

Boolean:

true is pathToTest is absolute

parsePluginDefinition
(
  • pluginDefinition
  • context
)
PluginDefinition
private

Defined in index.js:28

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:

PluginDefinition
reset ()

Defined in index.js:315

Forgets all registries and their plugins