browser-terminal-mirror
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -11,3 +11,3 @@ 'use strict'; | ||
options.port = options.port || 37901; | ||
options.errorPattern = options.errorPattern || [/.{5}Warning:/g]; | ||
options.errorPattern = options.errorPattern || [/Warning:/g,/errored\safter/g]; | ||
if (!Array.isArray(options.errorPattern)) { | ||
@@ -14,0 +14,0 @@ options.errorPattern = [options.errorPattern]; |
{ | ||
"name": "browser-terminal-mirror", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Redirect console output to the browser (from grunt, gulp, or any node app).", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -9,2 +9,3 @@ # browser-terminal-mirror | ||
Example showing Gulp output in a web page: | ||
![](screenshot.png) | ||
@@ -28,6 +29,2 @@ | ||
When starting `mirror`, the `errorPattern` option is used to determine when the browser div with the console output should pop up and overlay your page. Normally, the output is mirrored into a div that is hidden. | ||
Only when a line is output that that matches one of the `errorPattern` regex's will the div become visible. This is necessary since Grunt and Gulp do NOT print errors to stderr, only to stdout. The distinct patterns | ||
for Grunt and Gulp are the default error patterns if none are specified. | ||
In your html file, add the following script tag during development: | ||
@@ -39,2 +36,8 @@ | ||
When starting `mirror`, the `errorPattern` option is used to determine when the browser div with the console output should pop up and overlay your page. Normally, the output is mirrored into a div that is hidden. | ||
Only when a line is output that that matches one of the `errorPattern` regex's will the div become visible. This is necessary since Grunt and Gulp do NOT print errors to stderr, only to stdout. The distinct patterns | ||
for Grunt and Gulp are the default error patterns if none are specified. | ||
# API | ||
@@ -41,0 +44,0 @@ |
139781
53