JSPM

highlightjs-vue

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1294999
  • Score
    100M100P100Q187712F
  • License CC0-1.0

Highlight Single-File Components of Vue.js Framework

Package Exports

  • highlightjs-vue

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (highlightjs-vue) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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