vue-syntax-highlight
vue-syntax-highlight copied to clipboard
Feature request: support Vue Components implemented as .js files
trafficstars
It would be nice if vue-syntax-highlight can support Vue Components Implemented as "*.js" files. e.g for a component file like:
Vue.component('button-counter', {
data: function () {
return {
count: 0
}
},
method:{
doSomething(){...
}
}
,
template: '<button v-on:click="count++">You clicked me {{ count }} times.</button>'
})
The template string must be highlighted as HTML and the rest highlighted as JavaScript.
It will be useful for those who don't want to set up a full-blown Vue environment (to compile Single File Components) for a Medium-sized project.