Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
vue-hljs-with-line-number
Advanced tools
Vue.js syntax highlighting made easy, using highlight.js.
Simply install the npm package vue-hljs-with-line-number
:
npm install --save vue-hljs-with-line-number
In your main JavaScript file (eg. main.js
):
// Import Vue and vue-highlgihtjs
import Vue from 'vue'
import VueHljs from 'vue-highlightjs'
import 'vue-hljs-with-line-number/line-number.css';
// Tell Vue.js to use vue-hljs-with-line-number
Vue.use(VueHljs)
In your template, in order to highlight javascript code:
<!-- If your source-code lives in a variable called 'sourcecode' -->
<pre v-hljs="sourcecode">
<code class="javascript"></code>
</pre>
<!-- If you want to highlight hardcoded source-code -->
<pre v-hljs>
<code class="javascript">
const s = new Date().toString()
</code>
</pre>
Author: Chris Hager chris@linuxuser.at (https://www.metachris.com)
License: MIT
Contributors:
v1.0.7
<span></span>
.v1.0.6
v1.0.5
v1.0.4
v1.0.3
v1.0.2
v1.0.1
v1.0.0
FAQs
Syntax highlighting with highlight.js for Vue.js 2.x
The npm package vue-hljs-with-line-number receives a total of 2 weekly downloads. As such, vue-hljs-with-line-number popularity was classified as not popular.
We found that vue-hljs-with-line-number 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.