Created
March 21, 2020 11:13
-
-
Save tittee/83479b0f69536937c04b464d04d2fab1 to your computer and use it in GitHub Desktop.
Add main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// import external dependencies | |
import 'jquery'; | |
// Import everything from autoload | |
import './autoload/**/*' | |
// import local dependencies | |
import Router from './util/Router'; | |
import common from './routes/common'; | |
import home from './routes/home'; | |
import aboutUs from './routes/about'; | |
/** Populate Router instance with DOM routes */ | |
const routes = new Router({ | |
// All pages | |
common, | |
// Home page | |
home, | |
// About Us page, note the change from about-us to aboutUs. | |
aboutUs, | |
}); | |
// Load Events | |
jQuery(document).ready(() => routes.loadEvents()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment