<commit_before>/*
	Sets options and wraps some functionality around the source mapping functions
	provided by the UglifyJS library
*/
var SM = require('source-map'),
	fs = require('fs'),
	path = require('path'),
	wrench = require('wrench'),
	U = require('../../utils'),
	CONST = require('../../common/constants'),
	babylon = require('babylon'),
	babel = require('babel-core'),
	logger = require('../../logger'),
	_ = require('../../lib/alloy/underscore')._;

var lineSplitter = /(?:\r\n|\r|\n)/;

// Try to match this in our babel.transformFromAst calls?
exports.OPTIONS_OUTPUT = {
	ast: false,
	minified: false,
	compact: false,
	comments: false,
	babelrc: false,
	passPerPreset: true,
	presets: [{
		plugins: [
			require('babel-plugin-minify-numeric-literals'),
			require('babel-plugin-minify-constant-folding'),
			require('babel-plugin-minify-dead-code-elimination'),
		]
	}],
};

function mapLine(mapper, theMap, genMap, line) {
	mapper.addMapping({
		original: {
			line: theMap.count++,
			column: 0
		},
		generated: {
			line: genMap.count++,
			column: 0
		},
		source: theMap.filename
	});
	genMap.code += line + '\n';
}

function getTextFromGenerator(content, template) {
	if (typeof content !== 'undefined' && content !== null) {
		return content;
	} else {
		if (template && fs.existsSync(template)) {
			return fs.readFileSync(template, 'utf8');
		} else {
			return '';
		}
	}
}
<commit_msg>[ALOY-1567] Removed code minification because Titanium will do it for us later.<commit_after>/*
	Sets options and wraps some functionality around the source mapping functions
	provided by the UglifyJS library
*/
var SM = require('source-map'),
	fs = require('fs'),
	path = require('path'),
	wrench = require('wrench'),
	U = require('../../utils'),
	CONST = require('../../common/constants'),
	babylon = require('babylon'),
	babel = require('babel-core'),
	logger = require('../../logger'),
	_ = require('../../lib/alloy/underscore')._;

var lineSplitter = /(?:\r\n|\r|\n)/;

// Try to match this in our babel.transformFromAst calls?
exports.OPTIONS_OUTPUT = {
	ast: false,
	// do NOT minify Alloy code because Titanium will do it!
	minified: false,
	compact: false,
	comments: false,
	babelrc: false,
	passPerPreset: false
};

function mapLine(mapper, theMap, genMap, line) {
	mapper.addMapping({
		original: {
			line: theMap.count++,
			column: 0
		},
		generated: {
			line: genMap.count++,
			column: 0
		},
		source: theMap.filename
	});
	genMap.code += line + '\n';
}

function getTextFromGenerator(content, template) {
	if (typeof content !== 'undefined' && content !== null) {
		return content;
	} else {
		if (template && fs.existsSync(template)) {
			return fs.readFileSync(template, 'utf8');
		} else {
			return '';
		}
	}
}

{'fraction_non_alphanumeric': 0.174435542607429, 'fraction_numerical': 0.003641660597232338, 'mean_word_length': 3.7608318890814556, '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': '5613466', 'n_tokens_mistral': 1000, 'n_tokens_neox': 914, 'n_words': 230}