Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 095af4d

Browse files
committed
构建目标文档
1 parent 5227564 commit 095af4d

File tree

6 files changed

+41
-4
lines changed

6 files changed

+41
-4
lines changed

‎README.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# VUE-UI-DOCS
22

3+
vue 2.x 组件库自动解析 Markdown 示例,自动构建发布到 `github-pages``npm`
4+
5+
## 实现目标
6+
7+
- 自动发布
8+
- [ ] 使用 `Travis` 自动构建和发布代码
9+
- [ ] 提交代码到 `master` 分支,自动发布到 `github-pages`
10+
- [ ] 打标签 `tag``master` 分支,自动发布到 `npm`
11+
- 文档解析
12+
- [ ] `.md` 文件通过编写 `webpack` 加载器解析为 `vue` 代码
13+
- [ ] `Markdown` 文件解析其中包含 `snippet::: {code} :::` 格式为局部组件
14+
- 项目构建
15+
- [ ] `github-pages` 在线访问 (https://kitorv.github.io/vue-ui-docs)[https://kitorv.github.io/vue-ui-docs]
16+
- [ ] `npm` 包安装 (https://www.npmjs.com/package/vue-ui-docs)[https://www.npmjs.com/package/vue-ui-docs]
17+
18+
代码示例格式:
19+
20+
````markdown
21+
:::snippet 通过 `v-button` 标签初始化按钮。
22+
23+
```html
24+
<template>
25+
<div>
26+
<v-button>Default</v-button>
27+
</div>
28+
</template>
29+
```
30+
31+
:::
32+
````
33+
34+
解析示例渲染:
35+
36+
![代码解析示例](site/images/vue-snippet-02.png)
37+
338
## 创建项目
439

540
1. 全局安装 `Vue CLI` 更多内容查看[官方文档](https://cli.vuejs.org/zh/guide/installation.html)
@@ -496,7 +531,7 @@ module.exports = {
496531

497532
:::
498533

499-
## 时间绑定
534+
## 事件绑定
500535

501536
:::snippet 绑定 `click` 事件。
502537

@@ -642,4 +677,6 @@ base: process.env.NODE_ENV !== "production" ? "/" : "/vue-ui-docs",
642677
...
643678
```
644679

645-
8. 提交代码自动构建
680+
8. Git 新增标签 `v1.0.0` 提交推送代码,触发自动构建
681+
682+
![Travis 自动构建](site/images/vue-travis-03.png)

‎site/components/snippet.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default {
3030
computed: {
3131
codeIconSrc() {
3232
return this.showCode
33-
? "https://gw.alipayobjects.com/zos/rmsportal/wSAkBuJFbdxsosKKpqyq.svg"
33+
? "https://gw.alipayobjects.com/zos/rmsportal/OpROPHYqWmrMDBFMZtKF.svg"
3434
: "https://gw.alipayobjects.com/zos/rmsportal/wSAkBuJFbdxsosKKpqyq.svg";
3535
}
3636
}

‎site/images/vue-snippet-01.png

-336 Bytes
Loading[フレーム]

‎site/images/vue-snippet-02.png

28.3 KB
Loading[フレーム]

‎site/images/vue-travis-03.png

196 KB
Loading[フレーム]

‎src/button/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
:::
3232

33-
## 时间绑定
33+
## 事件绑定
3434

3535
:::snippet 绑定 `click` 事件。
3636

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /