From 0d7450108ca9df35cd7ab03aa23b4e63fca76957 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 24 Jun 2014 00:07:00 +0000 Subject: [PATCH] Use `dir` instead of `folder` in the language for `jshint:plugins` Props MattyRob. See #28464. git-svn-id: https://develop.svn.wordpress.org/trunk@28812 602fd350-edb4-49c9-b593-d223f7449a82 --- Gruntfile.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 8ea911c2b3..7318281276 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -281,20 +281,20 @@ module.exports = function(grunt) { '**/*.js', '!**/*.min.js' ], - // Limit JSHint's run to a single specified plugin folder: + // Limit JSHint's run to a single specified plugin directory: // - // grunt jshint:plugins --folder=foldername + // grunt jshint:plugins --dir=foldername // - filter: function( folderpath ) { - var index, folder = grunt.option( 'folder' ); + filter: function( dirpath ) { + var index, dir = grunt.option( 'dir' ); // Don't filter when no target folder is specified - if ( ! folder ) { + if ( ! dir ) { return true; } - folderpath = folderpath.replace( /\\/g, '/' ); - index = folderpath.lastIndexOf( '/' + folder ); + dirpath = dirpath.replace( /\\/g, '/' ); + index = dirpath.lastIndexOf( '/' + dir ); // Match only the folder name passed from cli if ( -1 !== index ) {