Skip to content

Instantly share code, notes, and snippets.

@vanaf1979
Last active February 16, 2020 11:56
Show Gist options
  • Save vanaf1979/fca8286bdc733456632caa492f4c266f to your computer and use it in GitHub Desktop.
Save vanaf1979/fca8286bdc733456632caa492f4c266f to your computer and use it in GitHub Desktop.
Gist for my "WordPress: Laravel Mix, Sass and ES6 Modules in theme development" tutorial at https://since1979.dev/wordpress-laravel-mix-sass-and-es6-modules-in-theme-development/
// Import components.
import Example from './components/example.js';
import ExampleTwo from './components/example-2.js';
// Initialize your components on DOM Ready.
$(document).ready( () => {
Example.init({
setting: 'New setting'
});
ExampleTwo.init();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment