consoleify
browserify transform to inject a custom console object that prefix the calls to it with the name of the module itself
Overview
This transform will turn this:
//my-module.jsvar { console;};moduleexports = someFunc;
Into this:
/*wrapping console start!*/var console = ;/*wrapping console end!*/ var {};moduleexports = someFunc;
So console methods calls are prefixed by the module where the call was done, for easy tracking/filtering of logs
the consoleify/console-wrapper
module is also part of this module
Install
npm i --save-dev consoleify
Usage
var consoleify = require( 'consoleify' );
var b = browserify();
b.add('./my-module');
b.transform( consoleify );
b.bundle().pipe(process.stdout);
License
MIT