Skip to content

Commit

Permalink
updata readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ReySun committed Mar 9, 2018
1 parent c132be7 commit 0556eec
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 8 deletions.
59 changes: 53 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,57 @@
## Console-In-Dom
``` bash
npm install console-in-dom --save
```
[live-preview](https://reysun.github.io/console-in-dom/) here

### Basic TYPE Screenshot
![](screenshots/ui_basic_01.png)
### how to use
#### es2015
``` javascript
import { ConsoleInDom } from 'console-in-dom';
let Console = ConsoleInDom.render(); //default render to document.body
Console.log(1);
console.log(1);
/*
let Console = ConsoleInDom.render(
document.getElementById('output-console')
);
Console.log(1);
console.log(1);
*/
```

### Array TYPE Screenshot
![](screenshots/ui_array_02.png)
#### commonJS
``` javascript
let Console = require('console-in-dom').render();
/*
let Console = require('console-in-dom').render(
document.getElementById('output-console')
);
Console.log(1);
console.log(1);
*/
```

### Object TYPE Screenshot
![](screenshots/ui_object_02.png)
#### unpkg
[https://unpkg.com/console-in-dom@1.0.1/console.min.js](https://unpkg.com/console-in-dom@1.0.1/console.min.js)
``` html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://unpkg.com/console-in-dom@1.0.1/console.css">
<title>console-in-dom</title>
</head>
<body>
<div id="console_output"></div>
<script src="https://unpkg.com/console-in-dom@1.0.1/console.min.js"></script>
<script>
var Console = ConsoleInDom.render();
Console.log(1);
console.log(1);
</script>
</body>
</html>
```
57 changes: 57 additions & 0 deletions dist/package/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## Console-In-Dom
``` bash
npm install console-in-dom --save
```
[live-preview](https://reysun.github.io/console-in-dom/) here

### how to use
#### es2015
``` javascript
import { ConsoleInDom } from 'console-in-dom';
let Console = ConsoleInDom.render(); //default render to document.body
Console.log(1);
console.log(1);
/*
let Console = ConsoleInDom.render(
document.getElementById('output-console')
);
Console.log(1);
console.log(1);
*/
```

#### commonJS
``` javascript
let Console = require('console-in-dom').render();
/*
let Console = require('console-in-dom').render(
document.getElementById('output-console')
);
Console.log(1);
console.log(1);
*/
```

#### unpkg
[https://unpkg.com/console-in-dom@1.0.1/console.min.js](https://unpkg.com/console-in-dom@1.0.1/console.min.js)
``` html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://unpkg.com/console-in-dom@1.0.1/console.css">
<title>console-in-dom</title>
</head>
<body>
<div id="console_output"></div>
<script src="https://unpkg.com/console-in-dom@1.0.1/console.min.js"></script>
<script>
var Console = ConsoleInDom.render();
Console.log(1);
console.log(1);
</script>
</body>
</html>
```
2 changes: 1 addition & 1 deletion dist/package/package.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"console-in-dom","version":"1.0.1","description":"rewite browser's method of console.log, console.log in DOM","home":"https://reysun.github.io/console-in-dom/","repository":{"type":"git","url":"git@github.com:ReySun/console-in-dom.git"},"main":"./console.js","keywords":["console","browser","console-in-dom"],"author":"ReySun <reysun_sky@outlook.com>","license":"MIT","typings":"./typings/console.d.ts"}
{"name":"console-in-dom","version":"1.0.2","description":"rewite browser's method of console.log, console.log in DOM","home":"https://reysun.github.io/console-in-dom/","repository":{"type":"git","url":"git@github.com:ReySun/console-in-dom.git"},"main":"./console.js","keywords":["console","browser","console-in-dom"],"author":"ReySun <reysun_sky@outlook.com>","license":"MIT","typings":"./typings/console.d.ts"}
1 change: 1 addition & 0 deletions npm-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var package = Object.assign({}, PKG, {

fs.copySync('./dist/global', './dist/package');
fs.copyFileSync('./dist/demo/console.css', './dist/package/console.css');
fs.copyFileSync('./README.md', './dist/package/README.md');
fs.writeJsonSync('./dist/package/package.json', package);
fs.copySync('./dist/typings', './dist/package/typings');
fs.copySync('./dist/cjs', './dist/package/cjs');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "console-in-dom",
"version": "1.0.1",
"version": "1.0.2",
"description": "rewite browser's method of console.log, console.log in DOM",
"home": "https://reysun.github.io/console-in-dom/",
"repository": {
Expand Down

0 comments on commit 0556eec

Please sign in to comment.