Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Maizify committed Sep 22, 2017
1 parent 80ccd15 commit 6a4926d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
English | [简体中文](./CHANGELOG_CN.md)

#### V3.0.0-dev (2017-xx-xx)
#### V3.0.0 (2017-09-22)

Basic:

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG_CN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[English](./CHANGELOG.md) | 简体中文

#### V3.0.0-dev (2017-xx-xx)
#### V3.0.0 (2017-09-22)

基础:

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ A lightweight, extendable front-end developer tool for mobile web page.

- View console logs
- View network requests
- View document elements
- View Cookies and localStorages
- Execute JS command manually
- Custom plugin

Expand All @@ -30,8 +32,9 @@ Import `dist/vconsole.min.js` to your project:
```html
<script src="path/to/vconsole.min.js"></script>
<script>
console.log('Hello world');
// then tap vConsole button to see the log
// init vConsole
var vConsole = new VConsole();
console.log('Hello world');
</script>
```

Expand Down Expand Up @@ -64,9 +67,7 @@ Plugin:

## Plugins

- [vConsole-resources](https://github.com/WechatFE/vConsole-resources)
- [vConsole-sources](https://github.com/WechatFE/vConsole-sources)
- [vConsole-elements](https://github.com/WechatFE/vConsole-elements)
- [vconsole-webpack-plugin](https://github.com/diamont1001/vconsole-webpack-plugin)


Expand Down
9 changes: 5 additions & 4 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ vConsole

- 查看 console 日志
- 查看网络请求
- 查看页面 element 结构
- 查看 Cookies 和 localStorage
- 手动执行 JS 命令行
- 自定义插件

Expand All @@ -30,8 +32,9 @@ npm install vconsole
```html
<script src="path/to/vconsole.min.js"></script>
<script>
console.log('Hello world');
// 然后点击右下角 vConsole 按钮即可查看到 log
// 初始化
var vConsole = new VConsole();
console.log('Hello world');
</script>
```

Expand Down Expand Up @@ -67,9 +70,7 @@ vConsole 本体:

## 插件列表

- [vConsole-resources](https://github.com/WechatFE/vConsole-resources)
- [vConsole-sources](https://github.com/WechatFE/vConsole-sources)
- [vConsole-elements](https://github.com/WechatFE/vConsole-elements)
- [vconsole-webpack-plugin](https://github.com/diamont1001/vconsole-webpack-plugin)


Expand Down
10 changes: 5 additions & 5 deletions doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Then save `dist/vconsole.min.js` to your project.
<head>
<script src="path/to/vconsole.min.js"></script>
<script>
var vc = new VConsole();
var vConsole = new VConsole();
</script>
</head>
```
Expand All @@ -34,7 +34,7 @@ Then save `dist/vconsole.min.js` to your project.

```javascript
var VConsole = require('path/to/vconsole.min.js');
var vc = new VConsole();
var vConsole = new VConsole();
```

Notice that `VConsole` is the prototype of vConsole. So vConsole panel will not be inserted into your page until you `new` it manually.
Expand All @@ -47,7 +47,7 @@ Notice that `VConsole` is the prototype of vConsole. So vConsole panel will not
After imported, vConsole should be inited manually:

```javascript
var vc = new VConsole(option);
var vConsole = new VConsole(option);
```

`option` is an optional object.
Expand All @@ -57,9 +57,9 @@ See [Public Properties & Methods](./public_properties_methods.md) for definition
Use `setOption()` to update `option`:

```javascript
vc.setOption('maxLogNumber', 5000);
vConsole.setOption('maxLogNumber', 5000);
// or:
vc.setOption({maxLogNumber: 5000});
vConsole.setOption({maxLogNumber: 5000});
```


Expand Down
10 changes: 5 additions & 5 deletions doc/tutorial_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ npm install vconsole
<head>
<script src="path/to/vconsole.min.js"></script>
<script>
var vc = new VConsole();
var vConsole = new VConsole();
</script>
</head>
```
Expand All @@ -34,7 +34,7 @@ npm install vconsole

```javascript
var VConsole = require('path/to/vconsole.min.js');
var vc = new VConsole();
var vConsole = new VConsole();
```

请注意,`VConsole` 只是 vConsole 的原型,而非一个已实例化的对象。所以在手动 `new` 实例化之前,vConsole 不会被插入到网页中。
Expand All @@ -47,17 +47,17 @@ var vc = new VConsole();
引入后, 需要手动初始化 vConsole:

```javascript
var vc = new VConsole(option);
var vConsole = new VConsole(option);
```

`option` 是一个选填的 object 对象,具体配置定义请参阅 [公共属性及方法](./public_properties_methods_CN.md)

使用 `setOption()` 来更新 `option`

```javascript
vc.setOption('maxLogNumber', 5000);
vConsole.setOption('maxLogNumber', 5000);
// 或者:
vc.setOption({maxLogNumber: 5000});
vConsole.setOption({maxLogNumber: 5000});


### 打印日志
Expand Down

0 comments on commit 6a4926d

Please sign in to comment.