]> git.r.bdr.sh - rbdr/sorting-hat-renderer/blob - lib/sorting_hat.js
update version
[rbdr/sorting-hat-renderer] / lib / sorting_hat.js
1 import Vue from 'vue';
2
3 import WaveRendererComponent from './components/wave_renderer';
4 import StatusComponent from './components/status';
5
6 /* global window */
7
8 const internals = {};
9
10 /**
11 * The main vue application, it is composed by the other components, no real
12 * logic otherwise
13 *
14 * @class SortingHat
15 */
16 internals.SortingHat = {
17
18 start() {
19
20 this.vm = new Vue({
21 el: '#sorting-hat',
22 components: {
23 waveRenderer: WaveRendererComponent,
24 status: StatusComponent
25 }
26 });
27 }
28 };
29
30 // Instantiates the app
31
32 internals.run = function () {
33
34 internals.SortingHat.start();
35 };
36
37 window.addEventListener('load', internals.run);