Module: plugins

Plugins.

Source:

Methods


<inner> clearCache()

Clear plugins cache.

Source:

<inner> get()

Get list of found and registered plugins. Each plugin is an object with keys: name - plugin name, path - plugin path, module - loaded plugin module. Order of resolving, if there plugins with the same names:

  1. Registered custom plugins.
  2. Plugins which are far from glace-core package.
Source:
Returns:
Type
array.<object>

<inner> getModules(moduleName)

Gets modules from plugins.

Parameters:
Name Type Description
moduleName string

Name of module to request from plugins.

Source:
Returns:
  • List of modules requested from plugins.
Type
Array.<object>

<inner> getNames(opts)

Gets names of plugins.

Parameters:
Name Type Description
opts object

Options.

Properties
Name Type Argument Description
type string <optional>

Type of plugins. Supported values are custom and system, if omitted then names of all plugins will be returned.

Source:
Returns:

Plugin names.

Type
array.<string>

<inner> register(name)

Registers custom plugin.

Parameters:
Name Type Description
name string

Name of plugin module.

Source:

<inner> remove(name)

Removes custom plugin from list of registered.

Parameters:
Name Type Description
name string

Name of registered plugin.

Source: