mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Removing _config, as it bleeds into global, and I don't like that.
Moved fileBegin and newDoclet back onto the handlers namespace of exports.
This commit is contained in:
parent
ab31150d9a
commit
a378c9f0b9
@ -5,37 +5,18 @@
|
|||||||
* @author Michael Mathews <micmath@gmail.com> - Wrote the first itteration with me :)
|
* @author Michael Mathews <micmath@gmail.com> - Wrote the first itteration with me :)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
exports.handlers = {
|
||||||
var _config = {
|
/**
|
||||||
prefix: {
|
* Logging the file name to the console.
|
||||||
fileBegin: " > ",
|
*/
|
||||||
newDoclet: " > "
|
fileBegin: function (data) {
|
||||||
|
console.log(data.filename);
|
||||||
},
|
},
|
||||||
suffix: {
|
/**
|
||||||
fileBegin: "",
|
* Logging the doclet object to the console. This will print out a lot of info,
|
||||||
newDoclet: ""
|
* so I suggest only using it for debugging.
|
||||||
},
|
*/
|
||||||
enable: {
|
newDoclet: function (data) {
|
||||||
fileBegin: true,
|
// console.log(data);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user