Home

Awesome

gulp-filename-hint

A gulp plugin for linting filenames.

Install

npm install --save-dev gulp-filename-hint

Usage

var gulp = require('gulp');
var filenameHint = require('gulp-filename-hint');

gulp.task('test', function () {
  return gulp.src('src/*.js')
    .pipe(filenameHint());
});

API

filenameHint(options)

options.regExp

Type: RegExp

Default: undefined

Only RegExp's with begin (^) and end ($) boundaries should be used.

gulp.task('test', function () {
  return gulp.src('src/*.js')
    .pipe(filenameHint({regExp: /^\w*$/}));
});

options.whiteList

Type: Array

Default: []

An array with allowed filenames. All names here will be automatically interpreted as valid ones.

gulp.task('test', function () {
  return gulp.src('src/*.js')
    .pipe(filenameHint({
      regExp: /^\w*$/,
      whiteList: ['README.md']
    }));
});

caiogondim.com  ·  GitHub @caiogondim  ·  Twitter @caio_gondim