vue-syntax-highlight icon indicating copy to clipboard operation
vue-syntax-highlight copied to clipboard

Feature request: support Vue Components implemented as .js files

Open FarzanRNobakht opened this issue 6 years ago • 0 comments
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.

FarzanRNobakht avatar Aug 20 '19 10:08 FarzanRNobakht