From 6305acef3bd25f51b408b38a9f4f11c3040480c5 Mon Sep 17 00:00:00 2001 From: schneefux Date: Tue, 8 May 2018 11:02:48 +0200 Subject: frontend template setup --- .babelrc | 3 + README.md | 11 + backend/index.js | 2 +- data | 2 +- dist/build.js | 7 + dist/index.html | 10 + index.html | 12 +- package-lock.json | 14990 ++++++++++++++++++++++++++++++++++++++++++---------- package.json | 22 +- src/App.vue | 14 + src/index.html | 10 + src/index.js | 12 + webpack.config.js | 45 + 13 files changed, 12424 insertions(+), 2716 deletions(-) create mode 100644 .babelrc create mode 100644 dist/build.js create mode 100644 dist/index.html create mode 100644 src/App.vue create mode 100644 src/index.html create mode 100644 src/index.js create mode 100644 webpack.config.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..002b4aa --- /dev/null +++ b/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["env"] +} diff --git a/README.md b/README.md index bd24adc..5269578 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,19 @@ `npm run backend` +## Building the frontend + + * production: `npm run build` + * development: `npm run dev` + ## Overview +### Frontend + +The frontend is written with the [Vue](https://vuejs.org) JavaScript framework and the [Bulma](https://bulma.io) CSS framework using [Buefy](https://buefy.github.io), built by [Webpack](https://webpack.js.org) with [Babel](https://babeljs.io) for cross browser support. It is hosted on GitHub pages. + +### Backend + ![backend flowchart](assets/backend-flow.png) The `/matches` endpoint is called in equidistant intervals for a small set of matches. An hour of each set is aggregated and stored in a timestamped json. All timestamped jsons are aggregated and generate the output report json. diff --git a/backend/index.js b/backend/index.js index 0befe86..dd64f9f 100644 --- a/backend/index.js +++ b/backend/index.js @@ -17,7 +17,7 @@ function main() { const firstOfMay = moment('2018-05-01'); const later = R.curry((base, hs) => base.clone().add(hs, 'hours')); - const hours = R.range(0, 24 * 5 + 20); + const hours = R.range(0, 24 * 7 + 10); const laterMoments = R.map(later(firstOfMay), hours); const futures = R.map(loadFTimestamped, laterMoments); diff --git a/data b/data index 9597d17..0b7b905 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 9597d175303c7ee8d836bac94a3393614b5ecf45 +Subproject commit 0b7b9050dacc14190af6ef781af098a9614ce582 diff --git a/dist/build.js b/dist/build.js new file mode 100644 index 0000000..6476439 --- /dev/null +++ b/dist/build.js @@ -0,0 +1,7 @@ +!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:i})},t.r=function(n){Object.defineProperty(n,"__esModule",{value:!0})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=15)}([function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"app",data:function(){return{message:"Hello, Vue!"}}}},function(n,e,t){"use strict";t.r(e);var i=t(0),o=t.n(i);for(var a in i)"default"!==a&&function(n){t.d(e,n,function(){return i[n]})}(a);e.default=o.a},function(n,e){var t;t=function(){return this}();try{t=t||Function("return this")()||(0,eval)("this")}catch(n){"object"==typeof window&&(t=window)}n.exports=t},function(n,e,t){"use strict";var i=function(){var n=this.$createElement;return(this._self._c||n)("h1",[this._v(this._s(this.message))])},o=[];i._withStripped=!0,t.d(e,"a",function(){return i}),t.d(e,"b",function(){return o})},function(n,e,t){"use strict";function i(n,e,t,i,o,a,r,s){var l,c="function"==typeof n?n.options:n;if(e&&(c.render=e,c.staticRenderFns=t,c._compiled=!0),i&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),r?(l=function(n){(n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(n=__VUE_SSR_CONTEXT__),o&&o.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(r)},c._ssrRegister=l):o&&(l=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(n,e){return l.call(e),d(n,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:n,options:c}}t.d(e,"a",function(){return i})},function(n,e,t){"use strict";function i(n,e){for(var t=[],i={},o=0;ot.parts.length&&(i.parts.length=t.parts.length)}else{var r=[];for(o=0;o