Skip to content

Instantly share code, notes, and snippets.

@psorensen
Last active February 15, 2018 14:06
Show Gist options
  • Select an option

  • Save psorensen/976445f8e8b9c5f7e780157e6deedd15 to your computer and use it in GitHub Desktop.

Select an option

Save psorensen/976445f8e8b9c5f7e780157e6deedd15 to your computer and use it in GitHub Desktop.
Sage 9 Alpha main.js
export default {
init() {
jQuery(document).ready(() => $('.slick').slick());
},
finalize() {
// JavaScript to be fired on all pages, after page specific JS is fired
},
};
// import external dependencies
import 'jquery';
import 'bootstrap/dist/js/bootstrap';
import 'slick-carousel/slick/slick';
// 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
common,
// Home page
home,
// About us page, note the change from about-us to aboutUs.
aboutUs,
};
// Load Events
jQuery(document).ready(() => new Router(routes).loadEvents());
alert('testing a change');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment