<commit_before>var gulp = require('gulp');
var jshint = require('gulp-jshint');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var concat = require('gulp-concat');
var minifyCSS = require('gulp-minify-css');
var pkg = require('./package.json');

var paths = {
	stylesheets: {
		plugins: [
			'bower_components/jquery-ui/themes/base/minified/jquery.ui.core.min.css',
			'bower_components/jquery-ui/themes/base/minified/jquery.ui.theme.min.css',
			'bower_components/jquery-ui/themes/base/minified/jquery.ui.resizable.min.css',
			'bower_components/jquery-ui/themes/base/minified/jquery.ui.theme.min.css'
		],
		app: 'src/jquery.' + pkg.name + '.css'
	},
	scripts: {
		plugins: [
			'bower_components/jquery/dist/jquery.min.js',
			'bower_components/jquery-ui/ui/minified/jquery.ui.core.min.js',
			'bower_components/jquery-ui/ui/minified/jquery.ui.widget.min.js',
			'bower_components/jquery-ui/ui/minified/jquery.ui.mouse.min.js',
			'bower_components/jquery-ui/ui/minified/jquery.ui.draggable.min.js',
			'bower_components/jquery-ui/ui/minified/jquery.ui.droppable.min.js',
			'bower_components/jquery-ui/ui/minified/jquery.ui.resizable.min.js',
			'bower_components/jquery-ui/ui/minified/jquery.ui.sortable.min.js'
		],
		app: 'src/jquery.' + pkg.name + '.js'
	}
};

gulp.task('css-dist', function() {
	gulp.src(paths.stylesheets.plugins)
		.pipe(concat('plugins.min.css'))
		.pipe(minifyCSS())
		.pipe(gulp.dest('build'));

	gulp.src(paths.stylesheets.app)
		.pipe(concat('jquery.' + pkg.name + '.min.css'))
		.pipe(minifyCSS())
		.pipe(gulp.dest('build'));
});

gulp.task('js-hint', function() {
	gulp.src(paths.scripts.app)
		.pipe(jshint())
		.pipe(jshint.reporter('default'));
});

gulp.task('js-dist', function() {
	gulp.src(paths.scripts.plugins)
		.pipe(concat('plugins.min.js'))
		.pipe(uglify())
		.pipe(gulp.dest('build'));

	gulp.src(paths.scripts.app)
		.pipe(rename('jquery.' + pkg.name + '.min.js'))
		.pipe(uglify())
		.pipe(gulp.dest('build'));
});

gulp.task('watch', function() {
	gulp.watch(paths.stylesheets.plugins, ['css-dist']);
	gulp.watch(paths.stylesheets.app, ['css-dist']);
	gulp.watch(paths.scripts.plugins, ['js-hint', 'js-dist']);
	gulp.watch(paths.scripts.app, ['js-hint', 'js-dist']);
});

gulp.task('default', ['css-dist', 'js-hint', 'js-dist', 'watch']);<commit_msg>adding preserveComments to uglify<commit_after>var gulp = require('gulp');
var jshint = require('gulp-jshint');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var concat = require('gulp-concat');
var minifyCSS = require('gulp-minify-css');
var pkg = require('./package.json');

var paths = {
	stylesheets: {
		plugins: [
			'bower_components/jquery-ui/themes/base/minified/jquery.ui.core.min.css',
			'bower_components/jquery-ui/themes/base/minified/jquery.ui.theme.min.css',
			'bower_components/jquery-ui/themes/base/minified/jquery.ui.resizable.min.css',
			'bower_components/jquery-ui/themes/base/minified/jquery.ui.theme.min.css'
		],
		app: 'src/jquery.' + pkg.name + '.css'
	},
	scripts: {
		plugins: [
			'bower_components/jquery/dist/jquery.min.js',
			'bower_components/jquery-ui/ui/minified/jquery.ui.core.min.js',
			'bower_components/jquery-ui/ui/minified/jquery.ui.widget.min.js',
			'bower_components/jquery-ui/ui/minified/jquery.ui.mouse.min.js',
			'bower_components/jquery-ui/ui/minified/jquery.ui.draggable.min.js',
			'bower_components/jquery-ui/ui/minified/jquery.ui.droppable.min.js',
			'bower_components/jquery-ui/ui/minified/jquery.ui.resizable.min.js',
			'bower_components/jquery-ui/ui/minified/jquery.ui.sortable.min.js'
		],
		app: 'src/jquery.' + pkg.name + '.js'
	}
};

gulp.task('css-dist', function() {
	gulp.src(paths.stylesheets.plugins)
		.pipe(concat('plugins.min.css'))
		.pipe(minifyCSS())
		.pipe(gulp.dest('build'));

	gulp.src(paths.stylesheets.app)
		.pipe(concat('jquery.' + pkg.name + '.min.css'))
		.pipe(minifyCSS())
		.pipe(gulp.dest('build'));
});

gulp.task('js-hint', function() {
	gulp.src(paths.scripts.app)
		.pipe(jshint())
		.pipe(jshint.reporter('default'));
});

gulp.task('js-dist', function() {
	gulp.src(paths.scripts.plugins)
		.pipe(concat('plugins.min.js'))
		.pipe(uglify())
		.pipe(gulp.dest('build'));

	gulp.src(paths.scripts.app)
		.pipe(rename('jquery.' + pkg.name + '.min.js'))
		.pipe(uglify({
			preserveComments: 'some'
		}))
		.pipe(gulp.dest('build'));
});

gulp.task('watch', function() {
	gulp.watch(paths.stylesheets.plugins, ['css-dist']);
	gulp.watch(paths.stylesheets.app, ['css-dist']);
	gulp.watch(paths.scripts.plugins, ['js-hint', 'js-dist']);
	gulp.watch(paths.scripts.app, ['js-hint', 'js-dist']);
});

gulp.task('default', ['css-dist', 'js-hint', 'js-dist', 'watch']);
{'fraction_non_alphanumeric': 0.21569459172852598, 'fraction_numerical': 0.0, 'mean_word_length': 4.496503496503497, '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': '1395540', 'n_tokens_mistral': 1970, 'n_tokens_neox': 1845, 'n_words': 190}