Merge pull request #157 from manix84/master

Verbose Output
This commit is contained in:
Michael Mathews 2012-08-12 13:45:19 -07:00
commit 425e56f835
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,17 @@
/**
* @author Rob Taylor [manix84@gmail.com]
*/
describe("verbose output plugin", function () {
var parser = new (require("jsdoc/src/parser")).Parser(),
plugin = require('plugins/verboseOutput'),
docSet;
installPlugins(['plugins/verboseOutput'], parser);
docSet = jasmine.getDocSetFromFile("plugins/verboseOutput.js", parser);
it("should log file names to console", function() {
var fileBegin = docSet.getByLongname("module:plugins/verboseOutput.handlers.fileBegin");
expect(fileBegin[0].description).toEqual("Logging the file name to the console.");
});
});

15
plugins/verboseOutput.js Normal file
View File

@ -0,0 +1,15 @@
/**
* Adds a verbose output to the console, so that you can see what's happening in your process.
* @module plugins/verboseOutput
* @author Rob Taylor <manix84@gmail.com> - The basic idea
* @author Michael Mathews <micmath@gmail.com> - Wrote the first itteration with me :)
*/
exports.handlers = {
/**
* Logging the file name to the console.
*/
fileBegin: function (data) {
console.log(data.filename);
}
};