-
Notifications
You must be signed in to change notification settings - Fork 0
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
5 changed files
with
113 additions
and
8 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 |
---|---|---|
@@ -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> | ||
``` |
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,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> | ||
``` |
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 @@ | ||
{"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"} |
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