gulp-notes
v0.1.0
Published
A small utility to grab specially marked comments to move to a notes file.
Downloads
166
Readme
gulp-notes
Quickly scan your files for specially formatted comments and dump them to a file.
Options
{
fileName: 'notes.md',
formats: [
['/*', '*/'],
['//', '\n'],
['<!--', '-->']
],
templates: {
header: '# Notes\n',
label: '\n## <%= label %>\n',
note: '* <%= note %> - <%= fileName %>:<%= lineNumber %>\n',
empty: '\nYou have literally nothing to do.\n',
footer: '\nGenerated: **<%= dateCreated %>**'
}
}
How Do I Use It?
var gulp = require('gulp'),
notes= require('gulp-notes');
gulp.task('notes', function() {
return gulp.src(paths.scripts)
.pipe(notes()))
.pipe(gulp.dest('./'));
});
Quick Example
/* BILL: Don't use a regular expression here, .indexOf is plenty idiot! */
var index = file.search(/bill/);
/* FIXME: Extra plus dumb dumb */
var durr = 'Hello +' + World;
// TODO: Make some useful examples.
var example = true;
Then we gulp
and get this beautiful thang.
# Notes
## BILL
Don't use a regular expression here, .indexOf is plenty idiot! - **js/file.js:1**
## FIXME
* This is broken - **js/file.js:4**
## TODO
* Make some useful examples. - **js/file.js:7**
Generated: **Saturday, March 1st, 2014, 1:20:35 PM**