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
This commit is contained in:
Scott Taylor 2014-06-24 00:07:00 +00:00
parent 723927ca74
commit 0d7450108c
1 changed files with 7 additions and 7 deletions

View File

@ -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 ) {