From a378c9f0b9d4224c07eafa6cd50194b9fb81dda9 Mon Sep 17 00:00:00 2001 From: Rob Taylor Date: Wed, 8 Aug 2012 19:03:40 +0100 Subject: [PATCH] Removing _config, as it bleeds into global, and I don't like that. Moved fileBegin and newDoclet back onto the handlers namespace of exports. --- plugins/verboseOutput.js | 43 +++++++++++----------------------------- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/plugins/verboseOutput.js b/plugins/verboseOutput.js index c45a9936..181ceaac 100644 --- a/plugins/verboseOutput.js +++ b/plugins/verboseOutput.js @@ -5,37 +5,18 @@ * @author Michael Mathews - Wrote the first itteration with me :) */ - -var _config = { - prefix: { - fileBegin: " > ", - newDoclet: " > " +exports.handlers = { + /** + * Logging the file name to the console. + */ + fileBegin: function (data) { + console.log(data.filename); }, - suffix: { - fileBegin: "", - newDoclet: "" - }, - enable: { - fileBegin: true, - newDoclet: false - } -}; - -/** - * Logging the file name to the console - */ -exports.fileBegin = function (event) { - if (_config.enable.fileBegin) { - console.log(_config.prefix.fileBegin, event.filename, _config.suffix.fileBegin); - } -}; - -/** - * Logging the doclet object to the console. This will print out a lot of info, - * so I suggest only using it for debugging. - */ -exports.newDoclet = function (event) { - if (_config.enable.newDoclet) { - console.log(_config.prefix.newDoclet, event, _config.suffix.newDoclet); + /** + * Logging the doclet object to the console. This will print out a lot of info, + * so I suggest only using it for debugging. + */ + newDoclet: function (data) { + // console.log(data); } };