2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-06-08 17:22:26 +03:00
Files
bbob/packages/bbob-vue2/README.md
T
Nikolay Kost a05e5cef07 chore(release): publish v2.9.0 (#170)
* chore: update readme to latest API

* chore: release 2.9.0
2023-01-29 17:55:46 +02:00

42 lines
991 B
Markdown

# @bbob/vue2
[![install size](https://packagephobia.now.sh/badge?p=@bbob/vue2)](https://packagephobia.now.sh/result?p=@bbob/vue2) [![Known Vulnerabilities](https://snyk.io/test/github/JiLiZART/bbob/badge.svg?targetFile=packages%2Fbbob-vue2%2Fpackage.json)](https://snyk.io/test/github/JiLiZART/bbob?targetFile=packages%2Fbbob-vue2%2Fpackage.json)
> Converts @bbob/parser AST tree to Vue 2
```shell
npm i @bbob/vue2 @bbob/preset-vue
```
```js
import Vue from 'vue'
import VueBbob from '@bbob/vue2';
Vue.use(VueBbob);
```
```html
<template>
<div class="vue2">
<h2>Generated vue2 here</h2>
<bbob-bbcode container="div" :plugins="plugins">{{ bbcode }}</bbob-bbcode>
</div>
</template>
<script>
import Vue from 'vue'
import preset from '@bbob/preset-vue'
export default Vue.extend({
name: 'App',
data() {
return {
bbcode: 'Text [b]bolded[/b] and [i]Some Name[/i]',
plugins: [
preset()
],
}
}
})
</script>
```