Index: Gruntfile.js
===================================================================
--- Gruntfile.js	(revision 29711)
+++ Gruntfile.js	(working copy)
@@ -2,7 +2,8 @@
 module.exports = function(grunt) {
 	var path = require('path'),
 		SOURCE_DIR = 'src/',
-		BUILD_DIR = 'build/';
+		BUILD_DIR = 'build/',
+		DIR_ERROR = 'No plugin directory specified, use --dir=foldername';
 
 	// Load tasks.
 	require('matchdep').filterDev(['grunt-*', '!grunt-legacy-util']).forEach( grunt.loadNpmTasks );
@@ -293,7 +294,7 @@
 
 					// Don't filter when no target folder is specified
 					if ( ! dir ) {
-						return true;
+						grunt.fail.fatal(DIR_ERROR);
 					}
 
 					dirpath = dirpath.replace( /\\/g, '/' );
@@ -351,6 +352,38 @@
 					'!wp-includes/js/underscore.min.js',
 					'!wp-includes/js/zxcvbn.min.js'
 				]
+			},
+			plugins: {
+				expand: true,
+				cwd: SOURCE_DIR + 'wp-content/plugins',
+				dest: BUILD_DIR,
+				ext: '.min.js',
+				src: [
+					'**/*.js',
+					'!**/*.min.js'
+				],
+				// Limit Uglify's run to a single specified plugin directory:
+				//
+				//    grunt uglify:plugins --dir=foldername
+				//
+				filter: function( dirpath ) {
+					var index, dir = grunt.option( 'dir' );
+
+					// Don't filter when no target folder is specified
+					if ( ! dir ) {
+						grunt.fail.fatal(DIR_ERROR);
+					}
+
+					dirpath = dirpath.replace( /\\/g, '/' );
+					index = dirpath.lastIndexOf( '/' + dir );
+
+					// Match only the folder name passed from cli
+					if ( -1 !== index ) {
+						return true;
+					}
+
+					return false;
+				}
 			}
 		},
 		concat: {
