<commit_before>/*global require */
(function(){
	'use strict';

	var gulp = require('gulp'),
		Merge = require('streamqueue'),
		argv = require('yargs').argv,
		del = require('del'),
		$ = require('gulp-load-plugins')({
			rename: {
				'gulp-sass': 'sass',
				'gulp-minify-css': 'minifycss'
			},
			lazy: false
		});

	gulp.task('clean', function() {
		return del('../Dist/Chrome', {
			force: true
		});
	});

	gulp.task('dist', function() {
		// CSS
		gulp.src('src/scss/*.scss')
			.pipe($.sass({ outputStyle: 'compressed', errLogToConsole: true }))
			.pipe($.autoprefixer({ browsers: ['last 2 version'] }))
			.pipe($.minifycss())
			.pipe(gulp.dest('../Dist/Chrome/dist/css'));

		// JS
		var libs = gulp.src(['src/js/play-midnight-*', '!src/js/play-midnight-browser.js', '!src/js/play-midnight-utils.js', '!src/js/play-midnight-core.js', '!src/js/play-midnight.js']),
			browser = gulp.src('src/js/play-midnight-browser.js'),
			utils = gulp.src('src/js/play-midnight-utils.js'),
			core = gulp.src('src/js/play-midnight-core.js'),
			script = gulp.src('src/js/play-midnight.js'),
			merged;

		merged = new Merge({ objectMode: true });
		merged.queue(browser);
		merged.queue(utils);
		merged.queue(core);
		merged.queue(libs);
		merged.queue(script);

		merged.done()
			.pipe($.jshint())
			.pipe($.jshint.reporter('default'))
			.pipe($.concat('play-midnight.js'))
			.pipe($.uglify())
			.pipe(gulp.dest('../Dist/Chrome/dist/js'));

		// Other
		gulp.src(['src/**/*.html', 'src/**/*.json', 'src/**/*.{png,ico,jpg,gif}'])
			.pipe(gulp.dest('../Dist/Chrome/dist'));

		return gulp.src(['manifest.json', '*.png'])
			.pipe(gulp.dest('../Dist/Chrome'))
			.pipe($.notify({ message: 'Build Task Completed' }));
	});

	gulp.task('copy', function() {
		return gulp.src('src/**/*.json')
			.pipe(gulp.dest('dist'));
	});

	/* Combine Sass / Libraries */
	gulp.task('styles', function() {
		var style = gulp.src('src/scss/*.scss');

		return style
			.pipe($.sass({ outputStyle: 'compressed', errLogToConsole: true }))
			.pipe($.autoprefixer({ browsers: ['last 2 version'] }))
			.pipe($.if(argv.prod, $.minifycss()))
			.pipe(gulp.dest('dist/css'))
			.pipe($.notify({ message: 'Styles Task Completed' }));
	});

	/* Main Script / Libraries */
	gulp.task('scripts', function() {
		var libs = gulp.src(['src/js/play-midnight-*', '!src/js/play-midnight-browser.js', '!src/js/play-midnight-utils.js', '!src/js/play-midnight-core.js', '!src/js/play-midnight.js']),
			browser = gulp.src('src/js/play-midnight-browser.js'),
			utils = gulp.src('src/js/play-midnight-utils.js'),
			core = gulp.src('src/js/play-midnight-core.js'),
			script = gulp.src('src/js/play-midnight.js'),
			merged;

		merged = new Merge({ objectMode: true });
		merged.queue(browser);
		merged.queue(utils);
		merged.queue(core);
		merged.queue(libs);
		merged.queue(script);

		return merged.done()
			.pipe($.jshint())
			.pipe($.jshint.reporter('default'))
			.pipe($.concat('play-midnight.js'))
			.pipe($.if(argv.prod, $.uglify()))
			.pipe(gulp.dest('dist/js'))
			.pipe($.notify({ message: 'Main Scripts Task Completed' }));
	});

	/* Images Script */
	gulp.task('images', function() {
		var images = gulp.src('src/images/**/*');

		return images
		.pipe(gulp.dest('dist/images'))
		.pipe($.notify({ message: 'Images Task Completed' }));
	});

	/* HTML Script */
	gulp.task('html', function() {
		var html = gulp.src('src/**/*.html');

		return html
		.pipe(gulp.dest('dist'))
		.pipe($.notify({ message: 'HTML Task Completed' }));
	});

	/* Watch File Changes */
	gulp.task('watch', function() {
		gulp.watch('src/scss/**/*.scss', ['styles']);
		gulp.watch('src/js/**/play-midnight*.js', ['scripts']);
		gulp.watch('src/images/**/*', ['images']);
		gulp.watch('src/**/*.html', ['html']);
		gulp.watch('src/**/*.json', ['copy']);
	});

	/* Default Task */
	gulp.task('default', ['styles', 'scripts', 'images', 'html', 'copy']);
	gulp.task('build', ['clean'], function() {
		gulp.start('dist');
	});
}());<commit_msg>Updated gulpfile to work with background script<commit_after>/*global require */
(function(){
	'use strict';

	var gulp = require('gulp'),
		Merge = require('streamqueue'),
		argv = require('yargs').argv,
		del = require('del'),
		$ = require('gulp-load-plugins')({
			rename: {
				'gulp-sass': 'sass',
				'gulp-minify-css': 'minifycss'
			},
			lazy: false
		});

	gulp.task('clean', function() {
		return del('../Dist/Chrome', {
			force: true
		});
	});

	gulp.task('dist', function() {
		// CSS
		gulp.src('src/scss/*.scss')
			.pipe($.sass({ outputStyle: 'compressed', errLogToConsole: true }))
			.pipe($.autoprefixer({ browsers: ['last 2 version'] }))
			.pipe($.minifycss())
			.pipe(gulp.dest('../Dist/Chrome/dist/css'));

		// JS
		var libs = gulp.src(['src/js/play-midnight-*', '!src/js/play-midnight-browser.js', '!src/js/play-midnight-utils.js', '!src/js/play-midnight-core.js', '!src/js/play-midnight.js']),
			browser = gulp.src('src/js/play-midnight-browser.js'),
			utils = gulp.src('src/js/play-midnight-utils.js'),
			core = gulp.src('src/js/play-midnight-core.js'),
			script = gulp.src('src/js/play-midnight.js'),
			merged;

		merged = new Merge({ objectMode: true });
		merged.queue(browser);
		merged.queue(utils);
		merged.queue(core);
		merged.queue(libs);
		merged.queue(script);

		merged.done()
			.pipe($.jshint())
			.pipe($.jshint.reporter('default'))
			.pipe($.concat('play-midnight.js'))
			.pipe($.uglify())
			.pipe(gulp.dest('../Dist/Chrome/dist/js'));

		// Background JS
		gulp.src(['src/js/**/*.js', '!src/js/play-midnight*'])
			.pipe($.jshint())
			.pipe($.jshint.reporter('default'))
			.pipe($.uglify())
			.pipe(gulp.dest('../Dist/Chrome/dist/js'));

		// Other
		gulp.src(['src/**/*.html', 'src/**/*.json', 'src/**/*.{png,ico,jpg,gif}'])
			.pipe(gulp.dest('../Dist/Chrome/dist'));

		return gulp.src(['manifest.json', '*.png'])
			.pipe(gulp.dest('../Dist/Chrome'))
			.pipe($.notify({ message: 'Build Task Completed' }));
	});

	gulp.task('copy', function() {
		return gulp.src(['src/**/*.json', 'src/**/*.js', '!src/**/play-midnight*'])
			.pipe(gulp.dest('dist'));
	});

	/* Combine Sass / Libraries */
	gulp.task('styles', function() {
		var style = gulp.src('src/scss/*.scss');

		return style
			.pipe($.sass({ outputStyle: 'compressed', errLogToConsole: true }))
			.pipe($.autoprefixer({ browsers: ['last 2 version'] }))
			.pipe($.if(argv.prod, $.minifycss()))
			.pipe(gulp.dest('dist/css'))
			.pipe($.notify({ message: 'Styles Task Completed' }));
	});

	/* Main Script / Libraries */
	gulp.task('scripts', function() {
		var libs = gulp.src(['src/js/play-midnight-*', '!src/js/play-midnight-browser.js', '!src/js/play-midnight-utils.js', '!src/js/play-midnight-core.js', '!src/js/play-midnight.js']),
			browser = gulp.src('src/js/play-midnight-browser.js'),
			utils = gulp.src('src/js/play-midnight-utils.js'),
			core = gulp.src('src/js/play-midnight-core.js'),
			script = gulp.src('src/js/play-midnight.js'),
			merged;

		merged = new Merge({ objectMode: true });
		merged.queue(browser);
		merged.queue(utils);
		merged.queue(core);
		merged.queue(libs);
		merged.queue(script);

		return merged.done()
			.pipe($.jshint())
			.pipe($.jshint.reporter('default'))
			.pipe($.concat('play-midnight.js'))
			.pipe($.if(argv.prod, $.uglify()))
			.pipe(gulp.dest('dist/js'))
			.pipe($.notify({ message: 'Main Scripts Task Completed' }));
	});

	/* Images Script */
	gulp.task('images', function() {
		var images = gulp.src('src/images/**/*');

		return images
		.pipe(gulp.dest('dist/images'))
		.pipe($.notify({ message: 'Images Task Completed' }));
	});

	/* HTML Script */
	gulp.task('html', function() {
		var html = gulp.src('src/**/*.html');

		return html
			.pipe(gulp.dest('dist'))
			.pipe($.notify({ message: 'HTML Task Completed' }));
	});

	/* Watch File Changes */
	gulp.task('watch', function() {
		gulp.watch('src/scss/**/*.scss', ['styles']);
		gulp.watch('src/js/**/play-midnight*.js', ['scripts']);
		gulp.watch('src/images/**/*', ['images']);
		gulp.watch('src/**/*.html', ['html']);
		gulp.watch(['src/**/*.json', 'src/**/*.js', '!src/**/play-midnight*'], ['copy']);
	});

	/* Default Task */
	gulp.task('default', ['styles', 'scripts', 'images', 'html', 'copy']);
	gulp.task('build', ['clean'], function() {
		gulp.start('dist');
	});
}());
{'fraction_non_alphanumeric': 0.25723202496699077, 'fraction_numerical': 0.0004801344376425399, 'mean_word_length': 3.6651735722284435, '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': '285283', 'n_tokens_mistral': 3517, 'n_tokens_neox': 3177, 'n_words': 470}