Extract code comments from source files
npm install broccoli-extract-commentsThis broccoli-plugin let's you extract code comments and write into an output-file.
Basic Usage
-----------
``js
// Brocfile.js
var extractComments = require('broccoli-extract-comments');
var commentsTree = extractComments('src', {
inputFiles: [
'*.'
],
outputFile: 'comments.txt'
});
module.exports = commentsTree;
`
#### options.allowNone
Type: Booleanfalse
Default value:
Allows for empty file paths in broccoli's globbing pattern
#### options.raw
Type: Booleanfalse
Default value:
Specifies whether to output raw comments instead of extracted text.
#### options.filter
Type: Functionnull
Default value:
Specify a callback-function to filter desired comments, i.e.:
`js`
function(comment) {
return comment.text.indexOf('Hello World!') >= 0;
}
#### options.outputFile
Type: String"comments.txt"
Default value:
Specifies destination file for extracted comments
#### options.separator
Type: String"\n"`
Default value:
Specifies separator for concatenated comments