rogain-config
Use to configure module required by rogain templating tools.
Config
The Config class creates a set of Registry
instances for managing the components and filters that are used by Rogain tools.
// create a config var config = ; // register modules to config registersconfigcomponents; configfilters;
get(type)
Returns a plain object representing the Config instance. Optional type argument can be passed to get a specific config registry.
config // => { components: { }, filters: { } }config // => { Button: { ... }, Form: { ... } }
Registry
The Registry class creates a dictonary for managing modules.
var components = components;components; components;
get(name)
gets selected registry data. passing a name will return the matching module or undefined if not found. If called with no arguments get
will return all modules as a plain object.
components // => modulecomponents // => { name: module }
register(name, module)
components;
register(modules)
components
unregister(name)
components;
Install
With npm do:
npm install rogain-config
License
MIT