166 Commits

Author SHA1 Message Date
Nathan Rajlich
908062b7b2 Release 1.0.0 1.0.0 2014-06-04 20:56:43 -07:00
Nathan Rajlich
91daf2860d dist: recompile 2014-06-02 11:41:49 -07:00
Nathan Rajlich
872115d10a make ms diff be global, not be scope
Closes #88.
Closes #90.
2014-06-02 11:36:49 -07:00
Nathan Rajlich
4ddbb61abd debug: ignore empty strings in enable()
Stops the unnecessary /^$/ regexp from being "enabled".
2014-06-01 14:27:13 -07:00
Nathan Rajlich
48114629b4 node: fix typo and optimize useColors() logic 2014-06-01 14:21:26 -07:00
Nathan Rajlich
e0b6b07cb6 node: make DEBUG_COLORS able to disable coloring
Fixes #59.
2014-06-01 11:09:55 -07:00
Nathan Rajlich
7df6b473ca example: fix "browser.html" example
To use new browserify standalone build
2014-06-01 10:41:09 -07:00
Nathan Rajlich
4501edeac6 dist: recompile 2014-06-01 10:39:37 -07:00
Nathan Rajlich
e502a7df95 *: export the colors array
DRYs up some of the logic in the process,
since the "core" color handling code gets
moved to `debug.js`

Closes #20.
2014-06-01 10:32:30 -07:00
Nathan Rajlich
9b5e9f7ef2 browser: even more robust "%c" handling
Now we support the user passing in their own
"%c" fields in `debug()` calls.
2014-06-01 10:26:58 -07:00
TJ Holowaychuk
9a282f9a41 Merge pull request #101 from visionmedia/use/browserify
Use "browserify" for standalone browser-side builds
2014-05-31 20:13:12 -07:00
Nathan Rajlich
808c5865b9 dist: recompile 2014-05-31 20:12:31 -07:00
Nathan Rajlich
43b0d51c21 npmignore: don't publish the dist dir
Not used in node/browserify, so not needed.
2014-05-31 20:12:31 -07:00
Nathan Rajlich
0c1a90a278 Makefile: refactor to use browserify
Uses browserify to build a `dist/debug.js` file for
standalone browser-side consumption.
2014-05-31 20:12:31 -07:00
Nathan Rajlich
44e6af18d3 package: add "browserify" as a dev dependency 2014-05-31 20:12:31 -07:00
Nathan Rajlich
533406869c debug: fix passing an Error object in directly 2014-05-31 20:12:17 -07:00
Nathan Rajlich
182505d365 Readme: add Web Inspector Colors section 2014-05-31 19:58:45 -07:00
Nathan Rajlich
9e4e0fff23 node: reset terminal color for the debug content
This is a controversial change as well, but it seems to be
wanted by the community, and usability is more important to me
than looks, so why not…

Closes #47.
Closes #52.
Closes #87.
2014-05-31 19:21:53 -07:00
Nathan Rajlich
32b0bf41eb browser, node: rename c to color
More clear for the user to override it this way.
See: #95
2014-05-31 19:18:41 -07:00
Nathan Rajlich
40abfe54e8 Merge pull request #100 from visionmedia/update/add-custom-formatters
Add custom "%n" formatters
2014-05-31 19:11:56 -07:00
Nathan Rajlich
652feca774 debug: remove hacky placeholder logic
@visionmedia pointed out that it is not necessary, which is
good because it was very hacky.
2014-05-31 18:57:30 -07:00
TJ Holowaychuk
ddd483df25 Merge pull request #99 from visionmedia/update/use-ms
debug: use "ms" module for humanizing the diff
2014-05-31 15:53:13 -07:00
Nathan Rajlich
b38496e03b node: map "%o" to util.inspect() 2014-05-31 14:24:59 -07:00
Nathan Rajlich
84951941a8 browser: map "%j" to JSON.stringify() 2014-05-31 14:24:43 -07:00
Nathan Rajlich
7a3f318cb6 debug: add custom "formatters"
So that the browser, node, and possibly the end users can
define their own "%n" formatters for the "format" argument
while using debug.
2014-05-31 14:23:18 -07:00
Nathan Rajlich
0f61fca93f browser: don't let "%%" throw off the color insertion index 2014-05-31 14:17:21 -07:00
Nathan Rajlich
61394bf18e debug: use "ms" module for humanizing the diff
This would be the first external dependency for `debug`,
so it's slightly controversial.
2014-05-31 13:24:29 -07:00
Nathan Rajlich
a4aacbd785 browser: fix the case of passing additional arguments after the "format"
Before the "%c" CSS color value was potentially being
inserted into the wrong place in the arguments array,
which would throw the formatting off in the Console.
2014-05-31 12:55:05 -07:00
Nathan Rajlich
eb80377e34 browser: fix colors in strict mode 2014-05-31 12:25:14 -07:00
Nathan Rajlich
b259bc0a10 Merge pull request #98 from TooTallNate/add/browser-colors
browser: add colors for WebKit browsers and Firebug
2014-05-31 12:24:06 -07:00
Nathan Rajlich
007123fa11 node: fix colors in strict mode
Before the `fmt` variable was not being updated.

Closes #70.
2014-05-31 12:22:05 -07:00
Nathan Rajlich
7af914c2c0 Readme: add "bash" syntax highlighting 2014-05-31 11:55:37 -07:00
Nathan Rajlich
546377c1e1 Merge pull request #51 from sorccu/patch-1
Minor README code fix.
2014-05-31 11:50:53 -07:00
Nathan Rajlich
d5addbcb45 Merge pull request #62 from jaredly/patch-1
typo
2014-05-31 11:35:43 -07:00
Nathan Rajlich
8bed009c84 browser: add Firebug color support 2014-05-31 11:16:12 -07:00
Nathan Rajlich
1fd62b0d86 Merge pull request #96 from TooTallNate/rewrite/share-node-browser-logic
Rewrite: abstract the common logic between Node.js and the browser
2014-05-31 10:44:11 -07:00
Nathan Rajlich
79b75ad626 browser: add colors for WebKit browsers
Based off of the implemention from #67, except this one
matches the Node.js colored output exactly, including the
trailing `diff` value.
2014-05-30 22:48:44 -07:00
Nathan Rajlich
83bae02343 debug: invoke save() at the beginning of enable()
We modify the `namespaces` argument directly for some reason,
which ends up saving input that ends up being invalid RegExp code
upon the next `load()`+`enable()` call combo.

Avoid that completely by just saving the input directly first thing.
Fixes browsers since they actually use the "saved" value.
2014-05-30 22:14:10 -07:00
Nathan Rajlich
f3eb1a5396 node: don't default save() to an empty string 2014-05-30 22:13:46 -07:00
Nathan Rajlich
3314c7761c browser: don't default save() to empty string 2014-05-30 22:13:23 -07:00
Nathan Rajlich
bea76f587b browser: fix undefined name variable 2014-05-30 00:29:14 -07:00
Nathan Rajlich
3eebad470a browser: fix comment typo 2014-05-30 00:23:56 -07:00
Nathan Rajlich
fbbf2ca884 node: , -> . 2014-05-30 00:18:17 -07:00
Nathan Rajlich
d05b468ee2 browser: , -> . 2014-05-30 00:18:08 -07:00
Nathan Rajlich
0c6d452292 node: apply log to console
Not necessary, just seems more "proper"
2014-05-30 00:15:29 -07:00
Nathan Rajlich
2cffe24185 rewrite: abstract common logic for Node & browsers 2014-05-30 00:10:10 -07:00
Nathan Rajlich
45010b65d0 add .jshintrc file 2014-05-30 00:07:15 -07:00
Nathan Rajlich
0269707d06 component: fix mismatching version number
The `component.json` file is at v0.8.1 currently.
2014-05-28 21:40:31 -07:00
TJ Holowaychuk
09a93468b0 Release 0.8.1 0.8.1 2014-04-14 19:04:38 -07:00
TJ Holowaychuk
192441f55b Merge pull request #86 from TooTallNate/update/add-component-section-to-package.json
package: re-add the "component" section
2014-04-14 19:03:47 -07:00