vue-prismjs-next

1.0.2 • Public • Published

vue-prism-js

mobile image

Vue component for formatting code using Prism.js

Installation

npm install vue-prismjs-next

Usage

In your component:

<template>
  <prismjs language="javascript">
    // your code here
  </prismjs>
</template>

<script>
import Prismjs from 'vue-prismjs-next'

export default {
  components: {
    Prismjs
  }
}
</script>

In your main.js file:

import Prismjs from './Prismjs.vue';

// ...

app.component('Prismjs', Prismjs)
// ...

Props

  • language (required): The language to use for syntax highlighting. You can find a list of supported languages here.
  • code (required): Code string.

Supported Vue Versions

  • Vue 2.x
  • Vue 3.x (using vue-demi)

Development

Install Dependencies

npm install

Build for Production

npm run build

Watch for Changes

npm run watch

Run Tests

npm test

Run Storybook

npm run storybook

Package Sidebar

Install

npm i vue-prismjs-next

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

978 kB

Total Files

11

Last publish

Collaborators

  • s00d