You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<template><labelclass="name-entry">
Enter your name: <inputtype="text" v-model="name"></label><divclass="name" v-if="name">Your name is {{ name }}.</div></template><script>module.exports={data: function(){return{name: ''};}};</script><stylescopedlang="sass">
.name-entryborder: 1px solid #CCCborder-radius: 4px
.namefont-size: 18px
</style>
The <template>, <script>, and <style> blocks can all accept a lang attribute, like so:
<templatelang="markdown">
# An H1 with my {{ name }}
</template>
This allows you to write your:
Markup in HAML, Pug/Jade, Markdown, Etc.
Scripts in JSX, TypeScript, CoffeeScript, ES2050 (or whatever)
Styles in Sass, SCSS, Less, Stylus
Vue is designed to be incredibly easy, then you get to this level and you're kinda screwed because it takes you a decade to setup webpack to be able to do this. It's a great idea, but it's a pain to set up.
The text was updated successfully, but these errors were encountered:
This is already started. Check out steal-vue. It works well for development, but there is an issue with the styles not exporting properly in the build, which I haven't had time to investigate. I would love the help, though, if you're up for it.
@TheJaredWilcurt if you can get the steal-sass plugin working in your project, it should support .sass. The plugin works really well in development, but unfortunately I couldn't figure out how to get the styles to build, and finally gave up. So the plugin is basically not worth using, which is sad. Maybe you can take a crack at figuring out the missing styles in the build. If not, the only way to get .vue single file component support is to use either Webpack or Fusebox, which both have absolutely amazing plugins.
Something that would make me use StealJS over Webpack would be out-of-the-box full support for Vue's single file (.vue) components.
Documentation:
Example:
enterName.vue
The
<template>
,<script>
, and<style>
blocks can all accept alang
attribute, like so:This allows you to write your:
Vue is designed to be incredibly easy, then you get to this level and you're kinda screwed because it takes you a decade to setup webpack to be able to do this. It's a great idea, but it's a pain to set up.
The text was updated successfully, but these errors were encountered: