nl_tokens: loadModule - load module ( theme or plugin ) for app
pl_tokens: function loadModule ( data , name ) { if ( typeof data !== 'object' ) { return ; } // Run before load module if ( typeof data . willLoad === 'function' ) { data . willLoad ( ) ; } // CSS Style if ( Array . isArray ( data . styles ) ) { data . styles . forEach ( function ( styles ) { theme . add ( <mask> , name ) ; } ) ; } else if ( typeof data . styles === 'object' ) { theme . add ( data . styles , name ) ; } // Components if ( data . components !== undefined ) { theme . addComponents ( data . components , name ) ; } // Layouts if ( data . layouts !== undefined ) { addLayout ( data . layouts ) ; } // I18n if ( data . i18n !== undefined ) { addTranslation ( data . i18n ) ; } // Redux actions if ( data . actions !== undefined ) { addActions ( data . actions ) ; } // Redux reducers if ( typeof data . reducers === 'function' ) { data . reducers ( ) ; } // Run after load module if ( typeof data . loaded === 'function' ) { data . loaded ( ) ; } }