gulp-textlint

13.4.1 • Public • Published

gulp-textlint

gulp plugin for textlint.

Usage

var gulp = require('gulp');
var textlint = require('gulp-textlint');

gulp.task('textlint', function() {
  return gulp.src('./path/to/src/**/*.md')
    .pipe(textlint());
});

As you can path to config for textlint. Like below.

...
gulp.task('textlint', function() {
  return gulp.src('./path/to/src/**/*.md')
    .pipe(textlint({
      formatterName: "pretty-error"
    });
});

When you would like to change target dynamically you should use yargs.

e.g.

var argv = require('yargs').argv;

gulp.task('textlint', function() {
  var src = argv.t;
  return gulp.src(src)
    .pipe(textlint());
});

gulp.task('watch', function() {
  var src = argv.t;
  if (src) {
    gulp.watch(src, ['textlint']);
  }
});

Then execute watch task with -t option.

gulp watch -t "./path/to/*.md"

Example

Please See example/.

Readme

Keywords

none

Package Sidebar

Install

npm i gulp-textlint

Weekly Downloads

10

Version

13.4.1

License

MIT

Unpacked Size

4.56 kB

Total Files

4

Last publish

Collaborators

  • textlint-user
  • azu
  • 0x6b
  • nakajmg