This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
highlightjs-vue with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
highlight.js syntax definition for Vue.
Support for single-file Vue.js components.
The files with
Simply include the
highlight.js script package in your webpage or node app, load up this module and apply it to
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();