Index: Gruntfile.js
===================================================================
--- Gruntfile.js	(revision 25144)
+++ Gruntfile.js	(working copy)
@@ -14,6 +14,13 @@
 				cwd: BUILD_DIR,
 				src: []
 			},
+			tinymce: {
+				src: [
+					'<%= concat.tinymce.dest %>',
+					BUILD_DIR + 'wp-includes/js/tinymce/wp-tinymce-schema.min.js',
+					BUILD_DIR + 'wp-includes/js/tinymce/mark_loaded.js'
+				]
+			}
 		},
 		copy: {
 			all: {
@@ -57,6 +64,7 @@
 					'wp-includes/js/plupload/handlers.js',
 					'wp-includes/js/plupload/wp-plupload.js',
 					'wp-includes/js/tinymce/plugins/wp*/js/*.js',
+					'wp-includes/js/tinymce/wp-tinymce-schema.js',
 					// Exceptions
 					'!wp-admin/js/custom-header.js', // Why? We should minify this.
 					'!wp-admin/js/farbtastic.js',
@@ -63,7 +71,8 @@
 					'!wp-admin/js/iris.min.js',
 					'!wp-includes/js/backbone.min.js',
 					'!wp-includes/js/swfobject.js',
-					'!wp-includes/js/underscore.min.js'
+					'!wp-includes/js/underscore.min.js',
+					'!wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js' // Hard-coded in the static html file
 				]
 			},
 			tinymce: {
@@ -72,16 +81,42 @@
 				dest: BUILD_DIR,
 				src: [
 					'wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js',
-					'wp-includes/js/tinymce/plugins/wp*/editor_plugin_src.js'
+					'wp-includes/js/tinymce/plugins/wp*/editor_plugin_src.js',
+					'wp-includes/js/tinymce/mark_loaded_src.js'
 				],
 				// TinyMCE plugins use a nonstandard naming scheme: plugin files are named
 				// `editor_plugin_src.js`, and are compressed into `editor_plugin.js`.
 				rename: function(destBase, destPath) {
-					destPath = destPath.replace('/editor_plugin_src.js', '/editor_plugin.js');
+					destPath = destPath.replace(/_src.js$/, '.js');
 					return path.join(destBase || '', destPath);
 				}
 			}
 		},
+		concat: {
+			tinymce: {
+				options: {
+					separator: '\n'
+				},
+				src: [
+					BUILD_DIR + 'wp-includes/js/tinymce/tiny_mce.js',
+					BUILD_DIR + 'wp-includes/js/tinymce/wp-tinymce-schema.min.js',
+					BUILD_DIR + 'wp-includes/js/tinymce/themes/advanced/editor_template.js',
+					BUILD_DIR + 'wp-includes/js/tinymce/plugins/*/editor_plugin.js',
+					BUILD_DIR + 'wp-includes/js/tinymce/mark_loaded.js'
+				],
+				dest: BUILD_DIR + 'wp-includes/js/tinymce/wp-tinymce.js'
+			}
+		},
+		compress: {
+			tinymce: {
+				options: {
+					mode: 'gzip',
+					level: 9
+				},
+				src: '<%= concat.tinymce.dest %>',
+				dest: BUILD_DIR + 'wp-includes/js/tinymce/wp-tinymce.js.gz'
+			}
+		},
 		watch: {
 			all: {
 				files: [
@@ -105,10 +140,12 @@
 	grunt.loadNpmTasks('grunt-contrib-cssmin');
 	grunt.loadNpmTasks('grunt-contrib-uglify');
 	grunt.loadNpmTasks('grunt-contrib-watch');
+	grunt.loadNpmTasks('grunt-contrib-compress');
+	grunt.loadNpmTasks('grunt-contrib-concat');
 
 	// Register tasks.
-	grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core',
-		'uglify:core', 'uglify:tinymce']);
+	grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core', 'uglify:core',
+		'uglify:tinymce', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce']);
 
 	// Default task.
 	grunt.registerTask('default', ['build']);
@@ -117,12 +154,14 @@
 	//
 	// On `watch:all`, automatically updates the `copy:dynamic` and `clean:dynamic`
 	// configurations so that only the changed files are updated.
-	grunt.event.on('watch', function(action, filepath, target) {
-		if (target != 'all') return;
+	grunt.event.on('watch', function( action, filepath, target ) {
+		if ( target != 'all' )
+			return;
 
-		var relativePath = path.relative(SOURCE_DIR, filepath);
-		var cleanSrc = (action == 'deleted') ? [relativePath] : [];
-		var copySrc = (action == 'deleted') ? [] : [relativePath];
+		var relativePath = path.relative( SOURCE_DIR, filepath );
+		var cleanSrc = ( action == 'deleted' ) ? [relativePath] : [];
+		var copySrc = ( action == 'deleted' ) ? [] : [relativePath];
+
 		grunt.config(['clean', 'dynamic', 'src'], cleanSrc);
 		grunt.config(['copy', 'dynamic', 'src'], copySrc);
 	});
Index: package.json
===================================================================
--- package.json	(revision 25144)
+++ package.json	(working copy)
@@ -14,6 +14,8 @@
     "grunt-contrib-copy": "~0.4.1",
     "grunt-contrib-cssmin": "~0.6.1",
     "grunt-contrib-uglify": "~0.2.2",
-    "grunt-contrib-watch": "~0.5.1"
+    "grunt-contrib-watch": "~0.5.1",
+    "grunt-contrib-compress": "~0.5.2",
+    "grunt-contrib-concat": "~0.3.0"
   }
 }
