Skip to content

Instantly share code, notes, and snippets.

@eirikb
Last active July 28, 2016 21:39
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/c3fd04a99fc8870d9cc6223143290354 to your computer and use it in GitHub Desktop.
Save eirikb/c3fd04a99fc8870d9cc6223143290354 to your computer and use it in GitHub Desktop.
vuetwo - demo

vuetwo demo

Proof of concept vue for the lazy

Usage

  1. Download zip
  2. npm install
  3. npm start

Library code can be found here

import Vue from 'vue';
import App from './app.vue';
new Vue({
el: '#app',
render: h => h(App)
});
<template>
<div>
<h1>Hello, {{test}}!</h1>
<child></child>
</div>
</template>
<style lang="less">
div {
h1 {
color: blue;
}
}
</style>
<script type="text/babel">
import Child from './child.vue';
export default {
components: {Child},
data() {
return {
test: 'world!'
};
}
};
</script>
<template>
<div>
<p>
<b>I am child, {{test}}</b>
</p>
</div>
</template>
<style scoped="true" lang="sass">
p {
b {
color: red;
}
}
</style>
<script>
export default {
data() {
return {
test: 'world!'
};
}
}
</script>
<!doctype html>
<title>vuetwo Demo</title>
<body>
<div id="app"></div>
<script src="build.js"></script>
</body>
{
"name": "vuetwo-test",
"version": "1.0.0",
"description": "",
"author": "eirikb@eirikb.no",
"license": "MIT",
"scripts": {
"start": "concurrently \"vuetwo app.js build.js\" \"lite-server\""
},
"devDependencies": {
"concurrently": "2.2.0",
"lite-server": "2.2.2",
"vuetwo": "http://eirikb.blob.core.windows.net/npm/vuetwo-1.0.0.tgz"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment