<commit_before>'use strict';

const gulp = require('gulp');

const addSrc = require('gulp-add-src');
const concat = require('gulp-concat');
const insert = require('gulp-insert');
const remoteSrc = require('gulp-remote-src');
const replace = require('gulp-replace');
const uglify = require('gulp-uglify');

const BENCHMARKJS_VERSION = '2.1.0';
const requestOptions = {
	'gzip': true,
	'strictSSL': true
};

gulp.task('js', function() {

	// Fetch Platform.js, Benchmark.js, and its jsPerf UI dependencies.
	remoteSrc([
		'bestiejs/platform.js/1.3.1/platform.js',
		`bestiejs/benchmark.js/${ BENCHMARKJS_VERSION }/benchmark.js`,
		`bestiejs/benchmark.js/${ BENCHMARKJS_VERSION }/example/jsperf/ui.js`,
		`bestiejs/benchmark.js/${ BENCHMARKJS_VERSION }/plugin/ui.browserscope.js`,
	], {
			'base': 'https://raw.githubusercontent.com/',
			'requestOptions': requestOptions
		}
	)

	// Use whatever version of lodash Benchmark.js is using.
	.pipe(addSrc.prepend(
		'node_modules/benchmark/node_modules/lodash/lodash.js'
	))

	.pipe(concat('all.js'))

	// Set the Google Analytics ID.
	.pipe(replace('gaId = \'\'', 'gaId = \'UA-6065217-40\''))

	// jsPerf is browser-only. Ensure we’re detected as a browser environment,
	// even if this is an AMD test, for example.
	.pipe(replace(/freeDefine = (?:[^;]+)/, 'freeDefine = false'))
	.pipe(replace(/freeExports = (?:[^;]+)/, 'freeExports = false'))<commit_msg>Include lodash in an npm v3-compatible way<commit_after>'use strict';

const gulp = require('gulp');

const addSrc = require('gulp-add-src');
const concat = require('gulp-concat');
const insert = require('gulp-insert');
const remoteSrc = require('gulp-remote-src');
const replace = require('gulp-replace');
const uglify = require('gulp-uglify');

const BENCHMARKJS_VERSION = '2.1.0';
const requestOptions = {
	'gzip': true,
	'strictSSL': true
};

gulp.task('js', function() {

	// Fetch Platform.js, Benchmark.js, and its jsPerf UI dependencies.
	remoteSrc([
		'bestiejs/platform.js/1.3.1/platform.js',
		`bestiejs/benchmark.js/${ BENCHMARKJS_VERSION }/benchmark.js`,
		`bestiejs/benchmark.js/${ BENCHMARKJS_VERSION }/example/jsperf/ui.js`,
		`bestiejs/benchmark.js/${ BENCHMARKJS_VERSION }/plugin/ui.browserscope.js`,
	], {
			'base': 'https://raw.githubusercontent.com/',
			'requestOptions': requestOptions
		}
	)

	// Use whatever version of lodash Benchmark.js is using.
	.pipe(addSrc.prepend(require.resolve('lodash')))

	.pipe(concat('all.js'))

	// Set the Google Analytics ID.
	.pipe(replace('gaId = \'\'', 'gaId = \'UA-6065217-40\''))

	// jsPerf is browser-only. Ensure we’re detected as a browser environment,
	// even if this is an AMD test, for example.
	.pipe(replace(/freeDefine = (?:[^;]+)/, 'freeDefine = false'))
	.pipe(replace(/freeExports = (?:[^;]+)/, 'freeExports = false'))
{'fraction_non_alphanumeric': 0.1847088245802072, 'fraction_numerical': 0.011075384065737763, 'mean_word_length': 4.458089668615984, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '854320', 'n_tokens_mistral': 1069, 'n_tokens_neox': 1017, 'n_words': 206}