Skip to content

Instantly share code, notes, and snippets.

@tiansial tiansial/main.js Secret
Created Oct 12, 2018

Embed
What would you like to do?
// import external dependencies
import 'jquery';
// import local dependencies
import Router from './util/Router';
import barbaInit from './barba/init';
import common from './routes/common';
import home from './routes/home';
/** Populate Router instance with DOM routes */
const routes = new Router({
common,
home,
});
// Load Events
jQuery(document).ready(() => {
routes.loadEvents();
barbaInit(routes);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.