Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including rogain-config with all npm packages installed. Try it out:

var rogainConfig = require("rogain-config")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

rogain-config v0.3.0

Rogain configuration utility


Use to configure module required by rogain templating tools.


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 = new Config();

// register modules to config registers
    Button: require('./components/Button.json'),
    Form: require('./components/Form.json')

config.filters.register('uppercase', require('./filters/uppercase'));


Returns a plain object representing the Config instance. Optional type argument can be passed to get a specific config registry.

config.get() // => { components: { }, filters: { } }
config.get('components') // => { Button: { ... }, Form: { ... } }

registerComponent(name, component)

Registers component. Sugar for config.components.register.


Unregisters component. Sugar for config.components.unregister.

registerFilter(name, filter)

Registers filter. Sugar for config.filters.register.


Unregisters filter. Sugar for config.filters.unregister.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free