33 |----------------------------------
44*/
55
6- /** ----------------------------------
6+ /*----------------------------------
77 *
88 * Set the default route path here
99 * ----------------------------------
1010 */
11- route . basePath ( 'example' ) ; // === '/'
11+ route . basePath ( '' ) ; // === '/'
12+
13+ /*-----------------------------------
14+ | Set the global runtime prefix.
15+ | This prefix will be appended
16+ | to every path before resolution.
17+ | So ensure when defining routes,
18+ | you have it as the main prefix.
19+ |------------------------------------
20+ */
21+ route . runtimePrefix ( '' ) ; // === ''
1222
1323/*-----------------------------------
1424 | set the directories in which we
1525 | can find the context files
1626 |-----------------------------------
1727*/
18- ContextProvider . directory = route . baseUrl ( 'contexts' ) ;
28+ ContextProvider . directory = route . baseUrl ( 'example/ contexts' ) ;
1929
2030/*-----------------------------------
2131 | set the version number of the
@@ -32,7 +42,7 @@ ContextProvider.version = '1.0.0';
3242 | from that directory
3343 |-----------------------------------
3444*/
35- MediatorManager . directory = route . baseUrl ( 'mediators' ) ;
45+ MediatorManager . directory = route . baseUrl ( 'example/ mediators' ) ;
3646
3747/*-----------------------------------
3848 | Set the version number of the
@@ -48,7 +58,7 @@ MediatorManager.version = '1.0.0';
4858 | directory for the loader
4959 |-----------------------------------
5060*/
51- loader . dir = route . baseUrl ( 'components' ) ;
61+ loader . dir = route . baseUrl ( 'example/ components' ) ;
5262
5363/*-----------------------------------
5464 | set the version number of the
@@ -65,7 +75,7 @@ loader.version = '1.0.0';
6575 |-----------------------------------
6676*/
6777
68- autoload . dir = route . baseUrl ( 'classes' ) ;
78+ autoload . dir = route . baseUrl ( 'example/ classes' ) ;
6979
7080/*-----------------------------------
7181 | set the version number of the
@@ -75,6 +85,25 @@ autoload.dir = route.baseUrl('classes');
7585*/
7686autoload . version = '1.0.0' ;
7787
88+
89+ /*---------------------------------
90+ | Get the initial body style so
91+ | so that when routes change,
92+ | we can reset the body style.
93+ | Sometimes, the body element's
94+ | style is affected by elements
95+ | That are no longer on the DOM.
96+ | example, bootstrap offcanvas.
97+ | In these cases, you need to
98+ | reset the body style when
99+ | the routeChanged event is fired
100+ | by the router. So you can listen
101+ | to it and use this to reset
102+ | the style.
103+ |----------------------------------
104+ */
105+ var __bodyStyle = document . body . getAttribute ( "style" ) ;
106+
78107/*--------------------------------
79108 | Set the logs clearing interval
80109 | for the broker to remove stale
@@ -97,4 +126,12 @@ broker.TIME_TO_GC = 10000; // 10 secs
97126 | collector for the broker
98127 |-------------------------------------------
99128*/
100- broker . removeStaleEvents ( ) ; // broker garbage collection started
129+ broker . removeStaleEvents ( ) ; // broker garbage collection started
130+
131+ /*------------------------------------------
132+ | When this is set to true, the broker
133+ | will display events and their payloads
134+ | in the console when they are fired
135+ |------------------------------------------
136+ */
137+ broker . withLogs ( true ) ;
0 commit comments