Scope Plugin


The scope plugin implements a CommonJS-like module system. This allows for simple sharing of code and state across different resources.


The scope plugin operates by default in module-level scope mode. This behavior can be changed through the scope field on the lumbar configuration object.


The scope field may either a string specifying the scoping mode or an object. If an object, it may have the following fields:

Additionally the scope plugin allows for specific resources to be loaded in the global scope by specifying "global": true on the specific resource. This is useful for 3rd party libraries such as zepto and backbone that expect to be loaded in the global scope. Global scoped files must appear at the beginning of a module.


Fork me on GitHub