An open API service indexing awesome lists of open source software.

https://github.com/s00d/vue-prismjs


https://github.com/s00d/vue-prismjs

Last synced: 11 months ago
JSON representation

Awesome Lists containing this project

README

          

# vue-prismjs-next

![mobile image](https://raw.githubusercontent.com/s00d/vue-prismjs/main/img/main.png)

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
```