:construction:🎨 Site > Improve structure/build and add example

This commit is contained in:
brunosimon
2017-08-02 23:58:10 +02:00
parent 6859c394f5
commit 9d6942b0df
57 changed files with 5096 additions and 299 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

@@ -0,0 +1,3 @@
<template src="./template.html"></template>
<script src="./script.js"></script>
<style src="./style.styl" lang="stylus"></style>
+29
View File
@@ -0,0 +1,29 @@
import socketIoClient from 'socket.io-client'
export default
{
name: 'application',
data()
{
return {
counter: 0
}
},
mounted()
{
const socketUrl = `${process.env === 'production' ? '' : 'http://192.168.1.12:1571/projects'}`
const socket = socketIoClient(socketUrl)
socket.on('connect', () =>
{
console.log('connected')
})
window.setInterval(() =>
{
this.counter++
}, 1000)
}
}
@@ -0,0 +1,2 @@
#application
background #f0f
@@ -0,0 +1,3 @@
<div id="application">
{{ counter }}
</div>
+13
View File
@@ -0,0 +1,13 @@
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from '@/components/application/'
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
template: '<App/>',
components: { App }
})