Edit this topic

Module discovery

: /modules/core/multi-tenancy/lib/module-discovery.js

: https://github.com/DecentCMS/DecentCMS/blob/master/modules/core/multi-tenancy/lib/module-discovery.js

Globals

discover()

Discovers modules under the paths passed as parameters. If no parameter is passed in, the search is performed under /modules and /themes.

discoverModule(modulePath, availableModules, [areas])object

Discovers the module under a path.

discover()

Discovers modules under the paths passed as parameters. If no parameter is passed in, the search is performed under /modules and /themes.

discoverModule(modulePath, availableModules, [areas]) ⇒ object

Discovers the module under a path.

Returns: object - The manifest of the module.

Param Type Description
modulePath string The path of the module's directory.
availableModules object Available modules will be added to this object.
[areas] object A map of area paths to area folder names.