# vue-demonstration

> Vue-based element docs's demo code style component, asily add examples to your vue project to show your code.

Latest version **1.0.4** (published 2017-07-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-demonstration
pnpm add vue-demonstration
yarn add vue-demonstration
bun add vue-demonstration
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2017-07-23 |
| First published | 2017-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | savoygu |
| Maintainers | savoygu |
| Keywords | vue, vue-demonstration, components |

## Links

- npm: https://www.npmjs.com/package/vue-demonstration
- Repository: https://github.com/savoygu/vue-demonstration
- Homepage: https://github.com/savoygu/vue-demonstration#readme
- Issues: https://github.com/savoygu/vue-demonstration/issues
- npm.io page: https://npm.io/package/vue-demonstration

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.3.3
- [vue-highlightjs](https://npm.io/package/vue-highlightjs.md) ^1.3.3

## Recent versions

- 1.0.4 (latest) — 2017-07-23
- 1.0.3 — 2017-07-23
- 1.0.2 — 2017-07-23
- 1.0.1 — 2017-07-22
- 1.0.0 — 2017-07-21

## README

# vue-demonstration

> Vue-based element docs's demo code style component, easily add examples to your Vue project to show your code.

## Install 

```bash
npm install vue-demonstration -S
```

## Quick Start
 
```bash
 import Vue from 'vue'
 import VueDemo from 'vue-demonstration'
 
 Vue.component('vue-demonstration', VueDemo)
 ```
 
For more information, please refer to [vue-demonstration](http://savoygu.github.io/vue-demonstration) in our documentation.
 
## Usage
 
```
<template>
  <vue-demonstration
    title="标题"
    description="标题描述"
    anchor="锚点"
    tag="标题标签" <!-- h2 / h3-->
    :highlight="sourcecode">
    <template slot="source">
      <div>your code</div> <!-- 源代码-->
    </template>
    <template slot="explanation">
      代码描述
    </template>
  </vue-demonstration>
</template>
<script>
  const sourcecode = `<div>your code</div>`
  export default {
     data () {
        return {
          sourcecode
        }
     }
  }
</script>
```

If you want to add some javascript code to `sourcecode`，you need to put the `sourcecode` into a js file.

## Build Setup

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run demo:dev

# build for demo with minification
npm run demo:build

# build for gh-pages with minification
npm run demo:prepublish

# build for production with minification
npm run build

# generate gh-pages
npm run deploy
```
## LICENSE

[MIT](http://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/vue-demonstration · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
