X-Git-Url: https://git.r.bdr.sh/rbdr/sorting-hat-renderer/blobdiff_plain/dc7f608a828fc0b34a291af915727ab1f7d6ba0a..b78f678de4f242b2a364bbf0cc39c8ec61ee5357:/lib/sorting_hat.js diff --git a/lib/sorting_hat.js b/lib/sorting_hat.js new file mode 100644 index 0000000..2568b75 --- /dev/null +++ b/lib/sorting_hat.js @@ -0,0 +1,37 @@ +import Vue from 'vue'; + +import WaveRendererComponent from './components/wave_renderer'; +import StatusComponent from './components/status'; + +/* global window */ + +const internals = {}; + +/** + * The main vue application, it is composed by the other components, no real + * logic otherwise + * + * @class SortingHat + */ +internals.SortingHat = { + + start() { + + this.vm = new Vue({ + el: '#sorting-hat', + components: { + waveRenderer: WaveRendererComponent, + status: StatusComponent + } + }); + } +}; + +// Instantiates the app + +internals.run = function () { + + internals.SortingHat.start(); +}; + +window.addEventListener('load', internals.run);