New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

gulp-textlint

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-textlint

gulp plugin for textlint


Version published
Weekly downloads
18
increased by100%
Maintainers
4
Weekly downloads
 
Created

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/.

FAQs

Package last updated on 05 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts