<commit_before>module.exports = function( grunt ) {
	"use strict";

	var	configs = {
			"win"		: { platform:  "win32", arch:  null, tasks: [ "nodewebkit:win", "compress:win" ] },
			"mac"		: { platform: "darwin", arch:  null, tasks: [ "nodewebkit:mac", "compress:mac" ] },
			"linux32"	: { platform:  "linux", arch: "x86", tasks: [ "nodewebkit:linux32", "copy:linux32scripts", "compress:linux32" ] },
			"linux64"	: { platform:  "linux", arch: "x64", tasks: [ "nodewebkit:linux64", "copy:linux64scripts", "compress:linux64" ] }
		};

	grunt.task.registerTask(
		"compile",
		"Compile the built project with node-webkit and compress it. " +
			"Optional targets: all:" + Object.keys( configs ).join( ":" ),
		function() {
			var tasks = Object.keys( this.flags );

			// compile for all platforms
			if ( tasks.length === 1 && tasks[0] === "all" ) {
				tasks = Object.keys( configs );

			// compile for current platform
			} else if ( tasks.length === 0 ) {
				tasks = Object.keys( configs ).filter(function( task ) {
					var config = configs[ task ];
					return	config.platform === process.platform
						&&	( config.arch === null || config.arch === process.arch );
				});

			// search for invalid flags
			} else if ( !tasks.every(function( task ) {
				return task in configs;
			}) ) {
				return grunt.fail.fatal(
					"Invalid targets. " +
					"Valid targets are: all:" + Object.keys( configs ).join( ":" )
				);
			}

			tasks.forEach(function( task ) {
				grunt.task.run( configs[ task ].tasks );
			});
		}
	);

};<commit_msg>Cleaned up the grunt compile task<commit_after>module.exports = function( grunt ) {
	"use strict";

	var	configs = {
			"win"		: { platform:  "win32", arch:  null, tasks: [] },
			"mac"		: { platform: "darwin", arch:  null, tasks: [] },
			"linux32"	: { platform:  "linux", arch: "x86", tasks: [
				"copy:linux32scripts"
			] },
			"linux64"	: { platform:  "linux", arch: "x64", tasks: [
				"copy:linux64scripts"
			] }
		};

	grunt.task.registerTask(
		"compile",
		"Compile the built project with node-webkit and compress it. " +
			"Optional platforms: all:" + Object.keys( configs ).join( ":" ),
		function() {
			var platforms = Object.keys( this.flags );

			// compile for all platforms
			if ( platforms.length === 1 && platforms[0] === "all" ) {
				platforms = Object.keys( configs );

			// compile for current platform
			} else if ( platforms.length === 0 ) {
				platforms = Object.keys( configs ).filter(function( platform ) {
					var config = configs[ platform ];
					return	config.platform === process.platform
						&&	( config.arch === null || config.arch === process.arch );
				});

			// search for invalid flags
			} else if ( !platforms.every(function( platform ) {
				return platform in configs;
			}) ) {
				return grunt.fail.fatal(
					"Invalid platforms. " +
					"Valid platforms are: all:" + Object.keys( configs ).join( ":" )
				);
			}

			platforms.forEach(function( platform ) {
				grunt.task.run( []
					// always run these tasks
					.concat([ "nodewebkit:" + platform ])
					// conditional tasks
					.concat( configs[ platform ].tasks )
					// also run these tasks afterwards
					.concat([ "compress:" + platform ])
				);
			});
		}
	);

};
{'fraction_non_alphanumeric': 0.17212608158220025, 'fraction_numerical': 0.012978986402966625, 'mean_word_length': 2.890625, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4402391', 'n_tokens_mistral': 1289, 'n_tokens_neox': 1047, 'n_words': 271}