highlightjs-vue

Highlight Single-File Components of Vue.js Framework
214,587,561 15
Install
npm install highlightjs-vue
Latest Version:1.0.0
License:CC0-1.0
Last Updated:Feb 7, 2022
Links: GitHub  ·  npm
Maintainer: ~lissette.ibnz

highlight.js syntax definition for Vue.

Support for single-file Vue.js components. The files with .vue extension allow to write html, javascript/typescript and styles in the same file.

Usage

Simply include the highlight.js script package in your webpage or node app, load up this module and apply it to hljs.

If you're not using a build system and just want to embed this in your webpage:

<script src="https://cdn.jsdelivr.net/npm/highlightjs"></script>
<script src="https://cdn.jsdelivr.net/npm/highlightjs-vue"></script>
<script>
  hljs.registerLanguage("vue", window.hljsDefineVue);
  hljs.initHighlightingOnLoad();
</script>

If you're using webpack / rollup / browserify / node:

var hljs = require("highlightjs");
var hljsDefineVue = require("highlightjs-vue");

hljsDefineVue(hljs);
hljs.initHighlightingOnLoad();

License

License: CC0-1.0

Related Packages

vue-hljs

Highlight.js plugin for Vue.js 3.0

50,789 19
@vesperjs/vue

This is Vesper for Vue.js.

8,552 1
@wzpo/md-ui

Another Momentum UI framework for Vue.js applications

2,054
vuenilla

Unstyled Vue.js component library.

1,552 2
vue-highlight-words

Vue component to highlight words within a larger body of text

625,582 80

Version History

Version Released License
1.0.0 CC0-1.0
Pre-releases (1)
Version Released License
1.0.0-beta CC0-1.0