Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/highlightjs/highlightjs-vue
highlight.js syntax definition for Vue.js
https://github.com/highlightjs/highlightjs-vue
highlightjs syntax-highlighting vue
Last synced: 3 months ago
JSON representation
highlight.js syntax definition for Vue.js
- Host: GitHub
- URL: https://github.com/highlightjs/highlightjs-vue
- Owner: highlightjs
- License: bsd-3-clause
- Created: 2019-09-01T10:23:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-07T12:21:17.000Z (almost 3 years ago)
- Last Synced: 2024-04-25T17:04:08.010Z (9 months ago)
- Topics: highlightjs, syntax-highlighting, vue
- Language: JavaScript
- Homepage:
- Size: 36.1 KB
- Stars: 14
- Watchers: 6
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
`highlight.js` syntax definition for Vue.
Support for single-file [Vue.js](https://vuejs.org/) 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:
```html
hljs.registerLanguage("vue", window.hljsDefineVue);
hljs.initHighlightingOnLoad();```
If you're using webpack / rollup / browserify / node:
```javascript
var hljs = require("highlightjs");
var hljsDefineVue = require("highlightjs-vue");hljsDefineVue(hljs);
hljs.initHighlightingOnLoad();
```### License
![GitHub](https://img.shields.io/github/license/highlightjs/highlightjs-vue?logo=License%20BSD-3-Clause)