https://github.com/s00d/vue-prismjs
https://github.com/s00d/vue-prismjs
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/s00d/vue-prismjs
- Owner: s00d
- Created: 2023-03-19T10:09:15.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-19T10:49:52.000Z (about 3 years ago)
- Last Synced: 2025-02-26T02:20:27.185Z (over 1 year ago)
- Language: JavaScript
- Size: 533 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-prismjs-next

Vue component for formatting code using Prism.js
## Installation
```
npm install vue-prismjs-next
```
## Usage
In your component:
```vue
// your code here
import Prismjs from 'vue-prismjs-next'
export default {
components: {
Prismjs
}
}
```
In your `main.js` file:
```js
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](https://prismjs.com/#supported-languages).
- `code` (required): Code string.
## Supported Vue Versions
- Vue 2.x
- Vue 3.x (using `vue-demi`)
## Development
### Install Dependencies
```bash
npm install
```
### Build for Production
```bash
npm run build
```
### Watch for Changes
```bash
npm run watch
```
### Run Tests
```bash
npm test
```
### Run Storybook
```bash
npm run storybook
```