Follow standard naming conventions for classes/non-classes in assets/scripts
This commit is contained in:
@@ -1,23 +1,25 @@
|
|||||||
// import external dependencies
|
/** import external dependencies */
|
||||||
import 'jquery';
|
import 'jquery';
|
||||||
import 'bootstrap/dist/js/bootstrap';
|
import 'bootstrap/dist/js/bootstrap';
|
||||||
|
|
||||||
// import local dependencies
|
/** import local dependencies */
|
||||||
import Router from './util/router';
|
import Router from './util/Router';
|
||||||
import common from './routes/Common';
|
import common from './routes/common';
|
||||||
import home from './routes/Home';
|
import home from './routes/home';
|
||||||
import aboutUs from './routes/About';
|
import aboutUs from './routes/about';
|
||||||
|
|
||||||
// Use this variable to set up the common and page specific functions. If you
|
/**
|
||||||
// rename this variable, you will also need to rename the namespace below.
|
* Populate Router instance with DOM routes
|
||||||
const routes = {
|
* @type {Router} routes - An instance of our router
|
||||||
// All pages
|
*/
|
||||||
|
const routes = new Router({
|
||||||
|
/** All pages */
|
||||||
common,
|
common,
|
||||||
// Home page
|
/** Home page */
|
||||||
home,
|
home,
|
||||||
// About us page, note the change from about-us to aboutUs.
|
/** About Us page, note the change from about-us to aboutUs. */
|
||||||
aboutUs,
|
aboutUs,
|
||||||
};
|
});
|
||||||
|
|
||||||
// Load Events
|
/** Load Events */
|
||||||
jQuery(document).ready(() => new Router(routes).loadEvents());
|
jQuery(document).ready(() => routes.loadEvents());
|
||||||
|
|||||||
Reference in New Issue
Block a user