vue-prismjs-next
v1.0.2
Published
Vue component for formatting code using Prism.js
Downloads
2
Maintainers
Readme
vue-prism-js
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