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 'bootstrap/dist/js/bootstrap';
|
||||
|
||||
// import local dependencies
|
||||
import Router from './util/router';
|
||||
import common from './routes/Common';
|
||||
import home from './routes/Home';
|
||||
import aboutUs from './routes/About';
|
||||
/** import local dependencies */
|
||||
import Router from './util/Router';
|
||||
import common from './routes/common';
|
||||
import home from './routes/home';
|
||||
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.
|
||||
const routes = {
|
||||
// All pages
|
||||
/**
|
||||
* Populate Router instance with DOM routes
|
||||
* @type {Router} routes - An instance of our router
|
||||
*/
|
||||
const routes = new Router({
|
||||
/** All pages */
|
||||
common,
|
||||
// Home page
|
||||
/** Home page */
|
||||
home,
|
||||
// About us page, note the change from about-us to aboutUs.
|
||||
/** About Us page, note the change from about-us to aboutUs. */
|
||||
aboutUs,
|
||||
};
|
||||
});
|
||||
|
||||
// Load Events
|
||||
jQuery(document).ready(() => new Router(routes).loadEvents());
|
||||
/** Load Events */
|
||||
jQuery(document).ready(() => routes.loadEvents());
|
||||
|
||||
Reference in New Issue
Block a user