
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
vue-highlightjs
Advanced tools
Vue.js syntax highlighting made easy, using highlight.js.
npm install --save vue-highlightjs
In your main JavaScript file (eg. main.js
):
// Import Vue and vue-highlgihtjs
import Vue from 'vue'
import VueHighlightJS from 'vue-highlightjs'
// Tell Vue.js to use vue-highlightjs
Vue.use(VueHighlightJS)
In your template, in order to highlight javascript code:
<!-- If your source-code lives in a variable called 'sourcecode' -->
<pre v-highlightjs="sourcecode"><code class="javascript"></code></pre>
<!-- If you want to highlight hardcoded source-code -->
<pre v-highlightjs><code class="javascript">const s = new Date().toString()</code></pre>
Any sort of contributions and feedback is much appreciated. Just leave an issue or pull-request!
This project uses the AirBnB code style.
Please run npm run lint
and npm run test
before you submit a pull request! <3
Author: Chris Hager chris@linuxuser.at (https://www.metachris.com)
License: MIT
Contributors:
v1.3.1
const
to var
for compatibility with PhantomJS and UglifyJSv1.2.2
FAQs
Syntax highlighting with highlight.js for Vue.js 2.x
The npm package vue-highlightjs receives a total of 6,215 weekly downloads. As such, vue-highlightjs popularity was classified as popular.
We found that vue-highlightjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.