-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
92 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
</a> | ||
</p> | ||
|
||
[English](../) | 简体中文 | ||
<a href="https://buptsteve.github.io/vuepress-plugin-demo-code/">English</a> | 简体中文 | ||
|
||
> demo-code plugin for vuepress. | ||
|
@@ -35,7 +35,7 @@ export default { | |
::: | ||
``` | ||
|
||
[实际效果请点击这里](./example/#实现效果) | ||
<a href="https://buptsteve.github.io/vuepress-plugin-demo-code/zh/example/">实际效果请点击这里</a> | ||
|
||
## Features | ||
* 只有一份代码同时生成 demo 和 code | ||
|
@@ -57,9 +57,21 @@ export default { | |
```bash | ||
$ npm i -D vuepress-plugin-demo-code | ||
# OR | ||
$ pnpm i -D vuepress-plugin-demo-code | ||
# OR | ||
$ yarn add -D vuepress-plugin-demo-code | ||
``` | ||
|
||
* 如果你用的是 [vuepress 2.x](https://v2.vuepress.vuejs.org/),请安装 next 版本。 | ||
|
||
```bash | ||
$ npm i -D vuepress-plugin-demo-code@next | ||
# OR | ||
$ pnpm i -D vuepress-plugin-demo-code@next | ||
# OR | ||
$ yarn add -D vuepress-plugin-demo-code@next | ||
``` | ||
|
||
## Usage | ||
配置 vuepress config | ||
|
||
|
@@ -83,6 +95,7 @@ module.exports = { | |
cssLibs: [ | ||
'https://unpkg.com/[email protected]/animate.min.css', | ||
], | ||
vueVersion: '^3', | ||
showText: 'show code', | ||
hideText: 'hide', | ||
styleStr: 'text-decoration: underline;', | ||
|
@@ -121,6 +134,12 @@ module.exports = { | |
|
||
展示 demo 所需的 css 库。 | ||
|
||
### vueVersion | ||
* 类型:`String` (语义化版本格式) | ||
* 默认值:`^2.6.14` | ||
|
||
vue 的语义化版本字符串。想要了解更多的语义化版本格式,可以看这里 [npm semver calculator](https://semver.npmjs.com/). | ||
|
||
### showText | ||
* 类型:`String` | ||
* 默认值:`show code` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,9 +57,21 @@ export default { | |
```bash | ||
$ npm i -D vuepress-plugin-demo-code | ||
# OR | ||
$ pnpm i -D vuepress-plugin-demo-code | ||
# OR | ||
$ yarn add -D vuepress-plugin-demo-code | ||
``` | ||
|
||
* If you are using [vuepress 2.x](https://v2.vuepress.vuejs.org/), please install the next version. | ||
|
||
```bash | ||
$ npm i -D vuepress-plugin-demo-code@next | ||
# OR | ||
$ pnpm i -D vuepress-plugin-demo-code@next | ||
# OR | ||
$ yarn add -D vuepress-plugin-demo-code@next | ||
``` | ||
|
||
## Usage | ||
Write vuepress config | ||
|
||
|
@@ -83,6 +95,7 @@ module.exports = { | |
cssLibs: [ | ||
'https://unpkg.com/[email protected]/animate.min.css', | ||
], | ||
vueVersion: '^3', | ||
showText: 'show code', | ||
hideText: 'hide', | ||
styleStr: 'text-decoration: underline;', | ||
|
@@ -121,6 +134,12 @@ Js libraries for the demo. | |
|
||
Css libraries for the demo. | ||
|
||
### vueVersion | ||
* Type: `String` (semantic versioning syntax) | ||
* Default: `^2.6.14` | ||
|
||
The semantic version string of vue. For more information on semantic versioning syntax, see the [npm semver calculator](https://semver.npmjs.com/). | ||
|
||
### showText | ||
* Type: `String` | ||
* Default: `show code` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<[include](../README.md) | ||
<[include](../README-zh_CN.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"baseUrl": ".", | ||
"paths": { | ||
"@/*": ["./src/*"] | ||
} | ||
} | ||
} |