Make WordPress Core

Ticket #28464: 28464v3.diff

File 28464v3.diff, 1.0 KB (added by MattyRob, 11 years ago)
  • Gruntfile.js

     
    281281                                        '**/*.js',
    282282                                        '!**/*.min.js'
    283283                                ],
    284                                 // Limit JSHint's run to a single specified plugin folder:
     284                                // Limit JSHint's run to a single specified plugin directory:
    285285                                //
    286                                 //    grunt jshint:plugins --folder=foldername
     286                                //    grunt jshint:plugins --dir=foldername
    287287                                //
    288                                 filter: function( folderpath ) {
    289                                         var index, folder = grunt.option( 'folder' );
     288                                filter: function( dirpath ) {
     289                                        var index, dir = grunt.option( 'dir' );
    290290
    291291                                        // Don't filter when no target folder is specified
    292                                         if ( ! folder ) {
     292                                        if ( ! dir ) {
    293293                                                return true;
    294294                                        }
    295295
    296                                         folderpath = folderpath.replace( /\\/g, '/' );
    297                                         index = folderpath.lastIndexOf( '/' + folder );
     296                                        dirpath = dirpath.replace( /\\/g, '/' );
     297                                        index = dirpath.lastIndexOf( '/' + dir );
    298298
    299299                                        // Match only the folder name passed from cli
    300300                                        if ( -1 !== index ) {