]> git.r.bdr.sh - rbdr/sorting-hat-renderer/blame - lib/sorting_hat.js
Merge branch 'release/1.0.0'
[rbdr/sorting-hat-renderer] / lib / sorting_hat.js
CommitLineData
4b3d8120
BB
1import Vue from 'vue';
2
3import WaveRendererComponent from './components/wave_renderer';
4import StatusComponent from './components/status';
5
6/* global window */
7
8const internals = {};
9
c6425032
BB
10/**
11 * The main vue application, it is composed by the other components, no real
12 * logic otherwise
13 *
14 * @class SortingHat
15 */
4b3d8120
BB
16internals.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
c6425032 30// Instantiates the app
4b3d8120
BB
31
32internals.run = function () {
33
34 internals.SortingHat.start();
35};
36
37window.addEventListener('load', internals.run);