@yoda/bolero~ Loader

Module loader. Loads modules under a directory as a lazily instantiated getter to target.

Constructor

new Loader(runtime, property)

Parameters:
Name Type Description
runtime object

an object named runtime.

property string

target property name on runtime object.

Methods

load(compDir)

Loads the directory and defines getters on target.

Parameters:
Name Type Description
compDir string

components directory to be loaded.

register(name, Klass)

Register the class.

Parameters:
Name Type Description
name string

name of the class

Klass function

Class constructor