Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
[fixed] updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thealjey committed Jan 22, 2017
1 parent 2eff57a commit 099ccd4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
30 changes: 27 additions & 3 deletions src/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,31 @@ const pattern = /at (?:(.*) )?\(?([^(]*):(\d+):(\d+)\)?$/,
separatorPattern = new RegExp(sep);

/**
* Various console helpers.
* Dead-simple, composable, isomorphic, cross-browser wrapper for `console.log`.
*
* <style>
* .console {
* box-shadow: 0 6px 10px 0 rgba(0,0,0,0.14), 0 1px 18px 0 rgba(0,0,0,0.12), 0 3px 5px -1px rgba(0,0,0,0.3);
* font-family: Consolas, Monaco, 'Andale Mono', monospace;
* font-size: 18px;
* }
* .console, .console .line { padding: 5px; }
* .console .line .in { color: #909090; }
* .console .line .out { color: #b3b3b3; }
* .console .line .string { color: #c6211d; }
* .console .line .bold { font-weight: bold; }
* .console .line .underline { text-decoration: underline; }
* .console .line .red { color: red; }
* .console .line .green { color: green; }
* .console .line .blue { color: blue; }
* </style>
* <div class="console"><div class="line"><span class="in">></span> log(<span
* class="string">'Colorful '</span>, bold(red(<span class="string">'R'</span>), green(<span
* class="string">'G'</span>), blue(<span class="string">'B'</span>)), <span
* class="string">' logs are '</span>, underline(<span class="string">'very'</span>), <span
* class="string">' easy!'</span>);</div><div class="line"><span class="out"><</span> Colorful <span class="bold"><span
* class="red">R</span></span><span class="green">G</span></span><span class="blue">B</span></span> logs are <span
* class="underline">very</span> easy!</div></div>
*
* @module logger
*/
Expand Down Expand Up @@ -272,9 +296,9 @@ export function formatErrorMarker(message: string = 'Error') {
* // var log = logger.log;
* // var consoleStyles = logger.consoleStyles;
*
* const {red, green, blue, bold} = consoleStyles;
* const {red, green, blue, bold, underline} = consoleStyles;
*
* log('Colorful ', bold(red('R'), green('G'), blue('B')), ' logs are ', bold('very'), ' easy!');
* log('Colorful ', bold(red('R'), green('G'), blue('B')), ' logs are ', underline('very'), ' easy!');
*/
export function log(...messages: Array<string | number | Message>) {
const msg = new Message({ansi: ['', ''], css: ''}).addMessages(messages);
Expand Down
4 changes: 2 additions & 2 deletions src/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const client = new Client(),
{yellow} = consoleStyles;

/**
* Using the Facebook Watchman, watches the directory `dir` for changes of files with extension `type` and runs
* `callback` when a change is detected.
* Using the [Facebook Watchman](https://facebook.github.io/watchman/), watches the directory `dir` for changes of files
* with extension `type` and runs `callback` when a change is detected.
*
* This watcher's only goal is performance, hence the simplicity.
*
Expand Down

0 comments on commit 099ccd4

Please sign in to comment.