Skip to content

Instantly share code, notes, and snippets.

@eirikb
Last active August 9, 2016 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eirikb/ea54a045e800e2aa3c3b0d5080911075 to your computer and use it in GitHub Desktop.
Save eirikb/ea54a045e800e2aa3c3b0d5080911075 to your computer and use it in GitHub Desktop.
vuetwo demo
npm i
npm start

Result:
Result

import Vue from 'vue'
import App from './app.vue'
new Vue({
el: '#app',
render: h => h(App)
})
<template>
<div>
<b>Hello, {{test}}!</b>
<child></child>
</div>
</template>
<style lang="less">
div {
b {
color: blue;
}
}
</style>
<script type="text/babel">
import Child from './Child.vue'
export default {
components: {Child},
data() {
return {
test: `world`
}
}
}
</script>
<template>
<b>I am child</b>
</template>
<style scoped="true" lang="sass">
b {
color: red;
}
</style>
<!DOCTYPE html>
<title>Demo</title>
<div id="app"></div>
<script src="build.js"></script>
{
"name": "demo",
"scripts": {
"server": "lite-server",
"watch": "vuetwo app.js build.js -w",
"start": "npm-run-all --parallel server watch"
},
"dependencies": {
"lite-server": "^2.2.2",
"npm-run-all": "^2.3.0",
"vuetwo": "https://github.com/eirikb/vuetwo.git"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment