gulp-textlint
v13.4.1
Published
gulp plugin for textlint
Downloads
126
Readme
gulp-textlint
gulp plugin for textlint.
- Require .textlintrc
- Require rules
- As you can use vvakame/prh's format dictionary.
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/.