mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-23 00:13:21 +03:00
ab6c6d959d
- Δημιουργία script για παραγωγή documention του κώδικα - Μικρές διορθώσεις
17 lines
571 B
JavaScript
17 lines
571 B
JavaScript
/**
|
|
* @overview Remove everything in a file except JSDoc-style comments. By enabling this plugin, you
|
|
* can document source files that are not valid JavaScript (including source files for other
|
|
* languages).
|
|
* @module plugins/commentsOnly
|
|
* @author Jeff Williams <jeffrey.l.williams@gmail.com>
|
|
*/
|
|
|
|
exports.handlers = {
|
|
beforeParse: function(e) {
|
|
// a JSDoc comment looks like: /**[one or more chars]*/
|
|
var comments = e.source.match(/\/\*\*[\s\S]+?\*\//g);
|
|
if (comments) {
|
|
e.source = comments.join('\n\n');
|
|
}
|
|
}
|
|
};
|