npm i
npm start
Last active
August 9, 2016 18:57
-
-
Save eirikb/ea54a045e800e2aa3c3b0d5080911075 to your computer and use it in GitHub Desktop.
vuetwo demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import App from './app.vue' | |
new Vue({ | |
el: '#app', | |
render: h => h(App) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<b>I am child</b> | |
</template> | |
<style scoped="true" lang="sass"> | |
b { | |
color: red; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<title>Demo</title> | |
<div id="app"></div> | |
<script src="build.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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