derby-subcomponents
v1.0.7
Published
Derby plugin for easily adding subcomponents without access to app
Downloads
4
Readme
derby-subcomponents
Derby plugin for easily adding subcomponents without access to app
How to use
Adds the possibility to add a subcomponents on your Component prototype - i.e. without access to app. E.g.
// When this component is loaded through app.component('./mycomponent/index.js'), the subcomponent will automatically be loaded namespaced to the maincomponents name (and possible namespace), i.e. you will have two components loaded (from below component):
// maincomponent
// maincomponent:subcomponent
function MyComponent () {}
MyComponent.prototype.name = 'maincomponent'
MyComponent.prototype.components = [require('subcomponent')]