Index: Gruntfile.js
===================================================================
--- Gruntfile.js	(revision 8941)
+++ Gruntfile.js	(working copy)
@@ -1,33 +1,35 @@
 /* jshint node:true */
 /* global module */
 module.exports = function( grunt ) {
-	var path   = require( 'path' ),
-	SOURCE_DIR = 'src/',
-	BUILD_DIR  = 'build/',
+	var SOURCE_DIR = 'src/',
+		BUILD_DIR  = 'build/',
 
-	BP_CSS = [
-		'**/*.css',
-		'!**/*-rtl.css'  // Exclude RTL files
-	],
+		// CSS
+		BP_CSS = [
+			'**/*.css'
+		],
 
-	BP_JS = [
-		'**/*.js',
+		// CSS exclusions, for excluding files from certain tasks, e.g. cssjanus
+		BP_EXCLUDED_CSS = [
+			'!**/*-rtl.css'
+		],
 
-		// Exclude third-party libraries.
-		'!bp-core/js/jquery.atwho.js',
-		'!bp-core/js/jquery.caret.js',
+		// JavaScript - Core
+		BP_JS = [
+			'**/*.js'
+		],
 
-		// Exclude legacy templates.
-		'!bp-templates/**/*.js',
+		// JavaScript exclusions, for excluding from certain tasks e.g jshint
+		BP_EXCLUDED_JS = [
+			'!bp-core/deprecated/js/**/*.js', // Depracted
+			'!bp-core/js/jquery.atwho.js',    // External 3rd party library
+			'!bp-core/js/jquery.caret.js',    // External 3rd party library
+			'!bp-core/js/jquery-cookie.js'    // External 3rd party library
+		];
 
-		// Exclude anything in any deprecated folders.
-		'!**/deprecated/**/*.js'
-	];
-
 	require( 'matchdep' ).filterDev( ['grunt-*', '!grunt-legacy-util'] ).forEach( grunt.loadNpmTasks );
 	grunt.util = require( 'grunt-legacy-util' );
 
-
 	grunt.initConfig( {
 		pkg: grunt.file.readJSON('package.json'),
 		jshint: {
@@ -38,12 +40,17 @@
 			core: {
 				expand: true,
 				cwd: SOURCE_DIR,
-				src: BP_JS,
+				src: BP_JS.concat( BP_EXCLUDED_JS ),
 
 				/**
-				 * Limit JSHint's run to a single specified file: grunt jshint:core --file=filename.js
-				 * Optionally, include the file path: grunt jshint:core --file=path/to/filename.js
+				 * Limit JSHint's run to a single specified file:
 				 *
+				 * grunt jshint:core --file=filename.js
+				 *
+				 * Optionally, include the file path:
+				 *
+				 * grunt jshint:core --file=path/to/filename.js
+				 *
 				 * @param {String} filepath
 				 * @returns {Bool}
 				 */
@@ -73,20 +80,12 @@
 				expand: true,
 				cwd: SOURCE_DIR,
 				dest: SOURCE_DIR,
+				extDot: 'last',
 				ext: '-rtl.css',
-				src: BP_CSS,
+				src: BP_CSS.concat( BP_EXCLUDED_CSS ),
 				options: { generateExactDuplicates: true }
-			},
-			dynamic: {
-				expand: true,
-				cwd: SOURCE_DIR,
-				dest: SOURCE_DIR,
-				ext: '-rtl.css',
-				src: [],
-				options: { generateExactDuplicates: true }
 			}
 		},
-
 		checktextdomain: {
 			options: {
 				correct_domain: false,
@@ -138,15 +137,8 @@
 				dest: SOURCE_DIR
 			}
 		},
-
 		clean: {
-			all: [ BUILD_DIR ],
-			dynamic: {
-				cwd: BUILD_DIR,
-				dot: true,
-				expand: true,
-				src: []
-			}
+			all: [ BUILD_DIR ]
 		},
 		copy: {
 			files: {
@@ -159,13 +151,6 @@
 						src: ['**', '!**/.{svn,git}/**']
 					}
 				]
-			},
-			dynamic: {
-				cwd: SOURCE_DIR,
-				dest: BUILD_DIR,
-				dot: true,
-				expand: true,
-				src: []
 			}
 		},
 		uglify: {
@@ -172,6 +157,7 @@
 			core: {
 				cwd: BUILD_DIR,
 				dest: BUILD_DIR,
+				extDot: 'last',
 				expand: true,
 				ext: '.min.js',
 				src: BP_JS
@@ -183,9 +169,10 @@
 			}
 		},
 		cssmin: {
-			ltr: {
+			minify: {
 				cwd: BUILD_DIR,
 				dest: BUILD_DIR,
+				extDot: 'last',
 				expand: true,
 				ext: '.min.css',
 				src: BP_CSS,
@@ -194,23 +181,8 @@
 					'<%= grunt.template.today("UTC:yyyy-mm-dd h:MM:ss TT Z") %> - ' +
 					'https://wordpress.org/plugins/buddypress/ */'
 				}
-			},
-			rtl: {
-				cwd: BUILD_DIR,
-				dest: BUILD_DIR,
-				expand: true,
-				ext: '.min.css',
-				src: BP_CSS.map( function( filename ) {
-					return filename.replace( '.css', '-rtl.css' );
-				}),
-				options: {
-					banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
-					'<%= grunt.template.today("UTC:yyyy-mm-dd h:MM:ss TT Z") %> - ' +
-					'https://wordpress.org/plugins/buddypress/ */'
-				}
 			}
 		},
-
 		phpunit: {
 			'default': {
 				cmd: 'phpunit',
@@ -233,7 +205,6 @@
 				stdout: false
 			}
 		},
-
 		jsvalidate:{
 			options:{
 				globals: {},
@@ -242,11 +213,15 @@
 			},
 			build: {
 				files: {
-					src: [BUILD_DIR + '/**/*.{min.js,js}' ]
+					src: [BUILD_DIR + '/**/*.js' ]
 				}
+			},
+			src: {
+				files: {
+					src: [SOURCE_DIR + '/**/*.js' ]
+				}
 			}
 		},
-
 		patch: {
 			options: {
 				tracUrl: 'buddypress.trac.wordpress.org'
@@ -258,9 +233,9 @@
 	/**
 	 * Register tasks.
 	 */
-	grunt.registerTask( 'build',         ['jsvalidate:build', 'jshint', 'cssjanus:core'] );
+	grunt.registerTask( 'build',         ['jsvalidate:src', 'jshint', 'cssjanus'] );
 	grunt.registerTask( 'build-commit',  ['build', 'checktextdomain', 'imagemin'] );
-	grunt.registerTask( 'build-release', ['build-commit', 'clean:all', 'copy:files', 'uglify:core', 'cssmin:ltr', 'cssmin:rtl', 'makepot', 'exec:bbpress', 'exec:bpdefault', 'test'] );
+	grunt.registerTask( 'build-release', ['build-commit', 'clean:all', 'copy:files', 'uglify', 'jsvalidate:build', 'cssmin', 'makepot', 'exec:bbpress', 'exec:bpdefault', 'test'] );
 
 	// Testing tasks.
 	grunt.registerMultiTask( 'phpunit', 'Runs PHPUnit tests, including the ajax and multisite tests.', function() {
@@ -273,7 +248,7 @@
 
 	grunt.registerTask( 'test', 'Run all unit test tasks.', ['phpunit'] );
 
-	grunt.registerTask( 'jstest', 'Runs all javascript tasks.', [ 'jsvalidate', 'jshint' ] );
+	grunt.registerTask( 'jstest', 'Runs all javascript tasks.', [ 'jsvalidate:src', 'jshint' ] );
 
 	// Travis CI Task
 	grunt.registerTask( 'travis', ['jshint', 'test'] );
@@ -283,24 +258,4 @@
 
 	// Default task.
 	grunt.registerTask( 'default', ['build'] );
-
-	/**
-	 * Add a listener to the watch task.
-	 *
-	 * On `watch:all`, automatically updates the `copy:dynamic` and `clean:dynamic` configurations so that only the changed files are updated.
-	 * On `watch:rtl`, automatically updates the `cssjanus:dynamic` configuration.
-	 */
-	grunt.event.on( 'watch', function( action, filepath, target ) {
-		if ( target !== 'all' && target !== 'rtl' ) {
-			return;
-		}
-
-		var relativePath = path.relative( SOURCE_DIR, filepath ),
-		cleanSrc = ( action === 'deleted' ) ? [ relativePath ] : [],
-		copySrc  = ( action === 'deleted' ) ? [] : [ relativePath ];
-
-		grunt.config( ['clean', 'dynamic', 'src'], cleanSrc );
-		grunt.config( ['copy', 'dynamic', 'src'], copySrc );
-		grunt.config( ['cssjanus', 'dynamic', 'src'], copySrc );
-	});
-};
\ No newline at end of file
+};
Index: package.json
===================================================================
--- package.json	(revision 8941)
+++ package.json	(working copy)
@@ -10,7 +10,7 @@
     "grunt-contrib-clean": "~0.6.0",
     "grunt-contrib-copy": "~0.5.0",
     "grunt-contrib-cssmin": "~0.10.0",
-    "grunt-contrib-imagemin": "~0.7.1",
+    "grunt-contrib-imagemin": "~0.8.0",
     "grunt-contrib-jshint": "~0.10.0",
     "grunt-contrib-uglify": "~0.5.1",
     "grunt-contrib-watch": "~0.6.1",
@@ -19,9 +19,8 @@
     "grunt-jsvalidate": "~0.2.2",
     "grunt-legacy-util": "^0.2.0",
     "grunt-patch-wordpress": "~0.2.1",
-    "grunt-phpunit": "~0.3.4",
     "grunt-sass": "~0.14.0",
-    "grunt-wp-i18n": "~0.4.6",
+    "grunt-wp-i18n": "~0.4.7",
     "matchdep": "~0.3.0"
   },
   "keywords": [
@@ -43,4 +42,4 @@
     "url": "https://buddypress.svn.wordpress.org/trunk/"
   },
   "version": "2.1.0"
-}
\ No newline at end of file
+}
Index: src/bp-activity/admin/css/admin-rtl.css
===================================================================
--- src/bp-activity/admin/css/admin-rtl.css	(revision 8941)
+++ src/bp-activity/admin/css/admin-rtl.css	(working copy)
@@ -77,4 +77,4 @@
 }
 .column-action {
 	width: 12%;
-}
\ No newline at end of file
+}
Index: src/bp-activity/admin/css/admin.css
===================================================================
--- src/bp-activity/admin/css/admin.css	(revision 8941)
+++ src/bp-activity/admin/css/admin.css	(working copy)
@@ -77,4 +77,4 @@
 }
 .column-action {
 	width: 12%;
-}
\ No newline at end of file
+}
Index: src/bp-activity/admin/js/admin.js
===================================================================
--- src/bp-activity/admin/js/admin.js	(revision 8941)
+++ src/bp-activity/admin/js/admin.js	(working copy)
@@ -170,4 +170,4 @@
 	postboxes.add_postbox_toggles( bp_activity_admin_vars.page );
 });
 
-})(jQuery);
\ No newline at end of file
+})(jQuery);
Index: src/bp-activity/css/mentions-rtl.css
===================================================================
--- src/bp-activity/css/mentions-rtl.css	(revision 8941)
+++ src/bp-activity/css/mentions-rtl.css	(working copy)
@@ -73,4 +73,4 @@
 		margin-top: -5px;
 		width: 30px;
 	}
-}
\ No newline at end of file
+}
Index: src/bp-activity/css/mentions.css
===================================================================
--- src/bp-activity/css/mentions.css	(revision 8941)
+++ src/bp-activity/css/mentions.css	(working copy)
@@ -73,4 +73,4 @@
 		margin-top: -5px;
 		width: 30px;
 	}
-}
\ No newline at end of file
+}
Index: src/bp-activity/js/mentions.js
===================================================================
--- src/bp-activity/js/mentions.js	(revision 8941)
+++ src/bp-activity/js/mentions.js	(working copy)
@@ -201,4 +201,4 @@
 		// Activity/reply, post comments, dashboard post 'text' editor.
 		$( '.bp-suggestions, #comments form textarea, .wp-editor-area' ).bp_mentions( users );
 	});
-})( jQuery );
\ No newline at end of file
+})( jQuery );
Index: src/bp-core/admin/css/common-rtl.css
===================================================================
--- src/bp-core/admin/css/common-rtl.css	(revision 8941)
+++ src/bp-core/admin/css/common-rtl.css	(working copy)
@@ -429,4 +429,4 @@
 		background-image: url('../images/menu-2x.png') !important;
 		background-size: 209px 64px;
 	}
-}
\ No newline at end of file
+}
Index: src/bp-core/admin/css/common.css
===================================================================
--- src/bp-core/admin/css/common.css	(revision 8941)
+++ src/bp-core/admin/css/common.css	(working copy)
@@ -429,4 +429,4 @@
 		background-image: url('../images/menu-2x.png') !important;
 		background-size: 209px 64px;
 	}
-}
\ No newline at end of file
+}
Index: src/bp-core/css/admin-bar-rtl.css
===================================================================
--- src/bp-core/css/admin-bar-rtl.css	(revision 8941)
+++ src/bp-core/css/admin-bar-rtl.css	(working copy)
@@ -55,4 +55,4 @@
 #wp-admin-bar-user-info img.avatar {
 	height: 64px;
 	width: 64px;
-}
\ No newline at end of file
+}
Index: src/bp-core/css/admin-bar.css
===================================================================
--- src/bp-core/css/admin-bar.css	(revision 8941)
+++ src/bp-core/css/admin-bar.css	(working copy)
@@ -55,4 +55,4 @@
 #wp-admin-bar-user-info img.avatar {
 	height: 64px;
 	width: 64px;
-}
\ No newline at end of file
+}
Index: src/bp-core/css/buddybar-rtl.css
===================================================================
--- src/bp-core/css/buddybar-rtl.css	(revision 8941)
+++ src/bp-core/css/buddybar-rtl.css	(working copy)
@@ -197,7 +197,7 @@
 	-webkit-border-radius: 3px;
 	border-radius: 3px;
 }
-#wp-admin-bar-user-info img.avatar { 
-	height: 64px; 
-	width: 64px; 
-}
\ No newline at end of file
+#wp-admin-bar-user-info img.avatar {
+	height: 64px;
+	width: 64px;
+}
Index: src/bp-core/css/buddybar.css
===================================================================
--- src/bp-core/css/buddybar.css	(revision 8941)
+++ src/bp-core/css/buddybar.css	(working copy)
@@ -197,7 +197,7 @@
 	-webkit-border-radius: 3px;
 	border-radius: 3px;
 }
-#wp-admin-bar-user-info img.avatar { 
-	height: 64px; 
-	width: 64px; 
-}
\ No newline at end of file
+#wp-admin-bar-user-info img.avatar {
+	height: 64px;
+	width: 64px;
+}
Index: src/bp-core/deprecated/css/autocomplete/jquery-rtl.css
===================================================================
--- src/bp-core/deprecated/css/autocomplete/jquery-rtl.css	(revision 8945)
+++ src/bp-core/deprecated/css/autocomplete/jquery-rtl.css	(working copy)
@@ -1,81 +0,0 @@
-.ac_results {
-	padding: 0px;
-	overflow: hidden;
-	z-index: 99999;
-	background: #fff;
-	border: 1px solid #ccc;
-	-moz-border-radius-bottomleft: 3px;
-	-khtml-border-bottom-right-radius: 3px;
-	-webkit-border-bottom-right-radius: 3px;
-	border-bottom-right-radius: 3px;
-	-moz-border-radius-bottomright: 3px;
-	-khtml-border-bottom-left-radius: 3px;
-	-webkit-border-bottom-left-radius: 3px;
-	border-bottom-left-radius: 3px;
-}
-	.ac_results ul {
-		width: 100%;
-		list-style-position: outside;
-		list-style: none;
-		padding: 0;
-		margin: 0;
-	}
-
-	.ac_results li {
-		margin: 0px;
-		padding: 5px 10px;
-		cursor: pointer;
-		display: block;
-		font-size: 1em;
-		line-height: 16px;
-		overflow: hidden;
-	}
-		.ac_results li img {
-			margin-left: 5px;
-		}
-
-.ac_odd {
-	background-color: #f0f0f0;
-}
-
-.ac_over {
-	background-color: #888;
-	color: #fff;
-}
-
-ul.acfb-holder {
-	margin  : 0;
-	height  : auto !important;
-	height  : 1%;
-	overflow: hidden;
-	padding: 0;
-	list-style: none;
-}
-	ul.acfb-holder li {
-		float   : right;
-		margin  : 0 0 4px 5px;
-		list-style-type: none;
-	}
-
-	ul.acfb-holder li.friend-tab {
-		border-radius         : 3px;
-		-moz-border-radius    : 3px;
-		-webkit-border-radius : 3px;
-		border     : 1px solid #ffe7c7;
-		padding    : 2px 7px 2px;
-		background : #FFF9DF;
-		font-size: 1em;
-	}
-		li.friend-tab img.avatar {
-			border-width: 2px !important;
-			vertical-align: middle;
-		}
-
-		li.friend-tab span.p {
-			padding-right: 5px;
-			font-size: 0.8em;
-			cursor: pointer;
-		}
-
-input#send-to-input { width: 275px; }
-
Index: src/bp-core/deprecated/css/autocomplete/jquery.autocompletefb-rtl.css
===================================================================
--- src/bp-core/deprecated/css/autocomplete/jquery.autocompletefb-rtl.css	(revision 0)
+++ src/bp-core/deprecated/css/autocomplete/jquery.autocompletefb-rtl.css	(working copy)
@@ -0,0 +1,80 @@
+.ac_results {
+	padding: 0px;
+	overflow: hidden;
+	z-index: 99999;
+	background: #fff;
+	border: 1px solid #ccc;
+	-moz-border-radius-bottomleft: 3px;
+	-khtml-border-bottom-right-radius: 3px;
+	-webkit-border-bottom-right-radius: 3px;
+	border-bottom-right-radius: 3px;
+	-moz-border-radius-bottomright: 3px;
+	-khtml-border-bottom-left-radius: 3px;
+	-webkit-border-bottom-left-radius: 3px;
+	border-bottom-left-radius: 3px;
+}
+	.ac_results ul {
+		width: 100%;
+		list-style-position: outside;
+		list-style: none;
+		padding: 0;
+		margin: 0;
+	}
+
+	.ac_results li {
+		margin: 0px;
+		padding: 5px 10px;
+		cursor: pointer;
+		display: block;
+		font-size: 1em;
+		line-height: 16px;
+		overflow: hidden;
+	}
+		.ac_results li img {
+			margin-left: 5px;
+		}
+
+.ac_odd {
+	background-color: #f0f0f0;
+}
+
+.ac_over {
+	background-color: #888;
+	color: #fff;
+}
+
+ul.acfb-holder {
+	margin  : 0;
+	height  : auto !important;
+	height  : 1%;
+	overflow: hidden;
+	padding: 0;
+	list-style: none;
+}
+	ul.acfb-holder li {
+		float   : right;
+		margin  : 0 0 4px 5px;
+		list-style-type: none;
+	}
+
+	ul.acfb-holder li.friend-tab {
+		border-radius         : 3px;
+		-moz-border-radius    : 3px;
+		-webkit-border-radius : 3px;
+		border     : 1px solid #ffe7c7;
+		padding    : 2px 7px 2px;
+		background : #FFF9DF;
+		font-size: 1em;
+	}
+		li.friend-tab img.avatar {
+			border-width: 2px !important;
+			vertical-align: middle;
+		}
+
+		li.friend-tab span.p {
+			padding-right: 5px;
+			font-size: 0.8em;
+			cursor: pointer;
+		}
+
+input#send-to-input { width: 275px; }
Index: src/bp-core/deprecated/css/autocomplete/jquery.autocompletefb.css
===================================================================
--- src/bp-core/deprecated/css/autocomplete/jquery.autocompletefb.css	(revision 8945)
+++ src/bp-core/deprecated/css/autocomplete/jquery.autocompletefb.css	(working copy)
@@ -78,4 +78,3 @@
 		}
 
 input#send-to-input { width: 275px; }
-
Index: src/bp-core/images/admin-menu-arrow.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: src/bp-core/js/confirm.js
===================================================================
--- src/bp-core/js/confirm.js	(revision 8941)
+++ src/bp-core/js/confirm.js	(working copy)
@@ -10,4 +10,3 @@
 		}
 	});
 });
-
Index: src/bp-friends/js/widget-friends.js
===================================================================
--- src/bp-friends/js/widget-friends.js	(revision 8941)
+++ src/bp-friends/js/widget-friends.js	(working copy)
@@ -46,4 +46,4 @@
 			}
 		);
 	}
-}
\ No newline at end of file
+}
Index: src/bp-members/admin/js/admin.js
===================================================================
--- src/bp-members/admin/js/admin.js	(revision 8941)
+++ src/bp-members/admin/js/admin.js	(working copy)
@@ -52,4 +52,4 @@
 			options[i].selected = false;
 		}
 	}
-}
\ No newline at end of file
+}
Index: src/bp-templates/bp-legacy/js/buddypress.js
===================================================================
--- src/bp-templates/bp-legacy/js/buddypress.js	(revision 8941)
+++ src/bp-templates/bp-legacy/js/buddypress.js	(working copy)
@@ -1,3 +1,4 @@
+/* jshint undef: false, unused:false */
 // AJAX Functions
 var jq = jQuery;
 
@@ -421,7 +422,7 @@
 				'cookie': bp_get_cookies(),
 				'page': oldest_page,
 				'exclude_just_posted': just_posted.join(',')
-			}
+			};
 
 			load_more_search = bp_get_querystring('s');
 
Index: src/bp-templates/bp-legacy/js/password-verify.js
===================================================================
--- src/bp-templates/bp-legacy/js/password-verify.js	(revision 8941)
+++ src/bp-templates/bp-legacy/js/password-verify.js	(working copy)
@@ -1,3 +1,4 @@
+/* jshint undef: false */
 /* Password Verify */
 ( function( $ ){
 	function check_pass_strength() {
Index: src/bp-xprofile/admin/css/admin-rtl.css
===================================================================
--- src/bp-xprofile/admin/css/admin-rtl.css	(revision 8941)
+++ src/bp-xprofile/admin/css/admin-rtl.css	(working copy)
@@ -156,7 +156,7 @@
 		background-color: #fff;
 		visibility: visible !important;
 	}
-	
+
 	#field-group-tabs .ui-sortable-placeholder {
 		background: transparent;
 		border-bottom: none;
Index: src/bp-xprofile/admin/css/admin.css
===================================================================
--- src/bp-xprofile/admin/css/admin.css	(revision 8941)
+++ src/bp-xprofile/admin/css/admin.css	(working copy)
@@ -156,7 +156,7 @@
 		background-color: #fff;
 		visibility: visible !important;
 	}
-	
+
 	#field-group-tabs .ui-sortable-placeholder {
 		background: transparent;
 		border-bottom: none;
