aboutsummaryrefslogtreecommitdiff
path: root/lib/sorting_hat.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sorting_hat.js')
-rw-r--r--lib/sorting_hat.js37
1 files changed, 37 insertions, 0 deletions
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);