gulp-word-count

0.2.0 • Public • Published

Gulp Word Count

Gulp plugin for wordcount.

Usage

var wc = require('gulp-word-count');
 
 
gulp.task('wordcount', function() {
  var today = new Date();
  var datetime = [today.getDate(), today.getMonth() + 1, today.getFullYear()].join('_');
 
  return gulp.src('./book/**/*.md')
    .pipe(wc('wc_'+datetime+'.log'))
    .pipe(gulp.dest('./logs/');
 
});

Todo

New options to implement:

  • instead of just "file name", allow more option
  • allow for console.logging wordcount and pushing through files
  • allow for saving a file outside of the stream (sounds a little out of scope).
  • allow for "minimum" wordcount requirement, colorize failure and colorize achievement

Options

{
  file: 'filename',
  nanoMode: true, // for nano
  campNano: true, // for campnano
  start: 0, // wordcount start
  goal: 100000, // wordcount monthly goal
}

Package Sidebar

Install

npm i gulp-word-count

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • antjanus