Skip to content

Commit 02a0d5c

Browse files
author
ft
committed
pretty readme
1 parent f26f7a5 commit 02a0d5c

File tree

2 files changed

+28
-18
lines changed

2 files changed

+28
-18
lines changed

_readme.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ Introduction
55

66
`min-debug` is inspired by [tj@debug](https://github.com/visionmedia/debug)
77

8-
Support IE6+
8+
Support **IE6+**
99

10-
![IE6](https://cloud.githubusercontent.com/assets/4565306/5972401/d32f21c8-a893-11e4-813b-852973ae82e0.png)
10+
![IE6](https://cloud.githubusercontent.com/assets/4565306/5986698/2ccc14d8-a93f-11e4-9126-2be906af0951.png)
1111

1212
Easy for **Phone** debug log
1313

14-
![iPhone](https://cloud.githubusercontent.com/assets/4565306/5972402/de802978-a893-11e4-8f92-5902d99ae697.png)
14+
![iPhone](https://cloud.githubusercontent.com/assets/4565306/5986713/60262480-a940-11e4-963f-b8f911ec6011.png)
1515

16-
Also With log in Console
16+
Also work with log in **Console**
1717

1818
![Console](https://cloud.githubusercontent.com/assets/4565306/5972375/6ad4bc50-a893-11e4-812e-948bbae5f96d.png)
1919

@@ -22,14 +22,17 @@ Start
2222

2323
Debug with localStorage
2424

25-
Type `localStorage[mykey] = '*'`, and debug just like tj's debug
25+
Type `localStorage.debug = '*'`, then the debug logs just show like tj's debug
26+
27+
> if your website is maintained by different teams, you can customize your key rather than 'debug' when initing min-debug module
28+
> so teams won't disturb each other
2629
2730

2831
Debug with page
2932

30-
If browser not support localStorage or you want to see debug on page, use url debug
33+
If browser not support localStorage or you want to see debug log on page, use url debug
3134

32-
Type `mykey='*'` in url href either `location.search` or `location.hash`, and will see debug info in a textarea on page
35+
Type `debug='*'` in url href either `location.search` or `location.hash`, and will see debug info in a textarea on page
3336

3437
> the key pattern is regexp match, just like tj's debug
3538
> e.g. `localStorage.debug = 'api*, call, -*verbose*'`
@@ -45,14 +48,16 @@ run `min-debug` directly with [dist/debug.js](http://chunpu.github.io/min-debug/
4548
- module.exports
4649

4750

48-
If your program using browserify, you should init the debug key self
51+
If your website using browserify, you should init the debug mnodule self
52+
53+
`debug.js`
4954

5055
```js
5156
module.exports = exports = require('min-debug')
5257
exports.init('mykey') // default is debug
5358
```
5459

55-
`min-debug` does not support *print format*, because we may need log on some old browser like IE6
60+
`min-debug` does not support *print format*, because we may need to show logs on some old browsers like IE6
5661

5762
```js
5863
debug('my data', {foo: 'bar'}) // min-debug style

readme.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ Introduction
2121

2222
`min-debug` is inspired by [tj@debug](https://github.com/visionmedia/debug)
2323

24-
Support IE6+
24+
Support **IE6+**
2525

26-
![IE6](https://cloud.githubusercontent.com/assets/4565306/5972401/d32f21c8-a893-11e4-813b-852973ae82e0.png)
26+
![IE6](https://cloud.githubusercontent.com/assets/4565306/5986698/2ccc14d8-a93f-11e4-9126-2be906af0951.png)
2727

2828
Easy for **Phone** debug log
2929

30-
![iPhone](https://cloud.githubusercontent.com/assets/4565306/5972402/de802978-a893-11e4-8f92-5902d99ae697.png)
30+
![iPhone](https://cloud.githubusercontent.com/assets/4565306/5986713/60262480-a940-11e4-963f-b8f911ec6011.png)
3131

32-
Also With log in Console
32+
Also work with log in **Console**
3333

3434
![Console](https://cloud.githubusercontent.com/assets/4565306/5972375/6ad4bc50-a893-11e4-812e-948bbae5f96d.png)
3535

@@ -38,14 +38,17 @@ Start
3838

3939
Debug with localStorage
4040

41-
Type `localStorage[mykey] = '*'`, and debug just like tj's debug
41+
Type `localStorage.debug = '*'`, then the debug logs just show like tj's debug
42+
43+
> if your website is maintained by different teams, you can customize your key rather than 'debug' when initing min-debug module
44+
> so teams won't disturb each other
4245
4346

4447
Debug with page
4548

46-
If browser not support localStorage or you want to see debug on page, use url debug
49+
If browser not support localStorage or you want to see debug log on page, use url debug
4750

48-
Type `mykey='*'` in url href either `location.search` or `location.hash`, and will see debug info in a textarea on page
51+
Type `debug='*'` in url href either `location.search` or `location.hash`, and will see debug info in a textarea on page
4952

5053
> the key pattern is regexp match, just like tj's debug
5154
> e.g. `localStorage.debug = 'api*, call, -*verbose*'`
@@ -61,14 +64,16 @@ run `min-debug` directly with [dist/debug.js](http://chunpu.github.io/min-debug/
6164
- module.exports
6265

6366

64-
If your program using browserify, you should init the debug key self
67+
If your website using browserify, you should init the debug mnodule self
68+
69+
`debug.js`
6570

6671
```js
6772
module.exports = exports = require('min-debug')
6873
exports.init('mykey') // default is debug
6974
```
7075

71-
`min-debug` does not support *print format*, because we may need log on some old browser like IE6
76+
`min-debug` does not support *print format*, because we may need to show logs on some old browsers like IE6
7277

7378
```js
7479
debug('my data', {foo: 'bar'}) // min-debug style

0 commit comments

Comments
 (0)