<commit_before>var Compressor = require('node-minify').minify;

exports.init = function(grunt) {

	// Refactored out the `min_max_info` and `concat` helpers here
	// because `grunt.helper` is removed in future Grunt versions
	var minMax = require('grunt-lib-contrib').init(grunt).minMaxInfo,
		concat = function(source) {
			// Kinda hacky, but that’s how I roll…
			return source.map(function(filepath) {
				return grunt.file.read(filepath);
			}).join('\n');
		};

	return function(options) {
		var source = grunt.file.expand(options.source),
			destination = options.destination,
			max = concat(source),
			min,
			report = options.report;


		if (source.indexOf(destination) === -1) {
			// Ugly hack to create the destination path automatically if needed
		   grunt.file.write(destination, '');
		}

		// Minify all the things!
		new Compressor({
			'type': 'yui-' + options.type,
			'fileIn': source,
			'fileOut': destination,
			'callback': function(error) {<commit_msg>Clean up tasks/lib/yui-compressor.js<commit_after>var Compressor = require('node-minify').minify;

exports.init = function(grunt) {

	// Refactored out the `min_max_info` and `concat` helpers here
	// because `grunt.helper` is removed in future Grunt versions
	var minMax = require('grunt-lib-contrib').init(grunt).minMaxInfo;
	var concat = function(source) {
		// Kinda hacky, but that’s how I roll…
		return source.map(function(filepath) {
			return grunt.file.read(filepath);
		}).join('\n');
	};

	return function(options) {
		var source = grunt.file.expand(options.source);
		var destination = options.destination;
		var max = concat(source);
		var min;
		var report = options.report;

		// Ugly hack to create the destination path automatically if needed
		if (!grunt.file.exists(destination)) {
			grunt.file.write(destination, '');
		}

		// Minify all the things!
		new Compressor({
			'type': 'yui-' + options.type,
			'fileIn': source,
			'fileOut': destination,
			'callback': function(error) {
{'fraction_non_alphanumeric': 0.14098690835850958, 'fraction_numerical': 0.0005035246727089627, 'mean_word_length': 3.894088669950739, 'pattern_counts': {'":': 0, '<': 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': '3715985', 'n_tokens_mistral': 716, 'n_tokens_neox': 642, 'n_words': 164}