<commit_before>'use strict';

var babelify = require('babelify');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var uglify = require('gulp-uglify');
var gutil = require('gulp-util');
var filelog = require('gulp-filelog');
var header = require('gulp-header');
var sourcemaps = require('gulp-sourcemaps');

var fs = require('fs');
var path = require('path');

var PKG_INFO = require('./package.json');

// gulp-header.
var BANNER = fs.readFileSync('banner.txt').toString();
var BANNER_OPTS = {
    pkg: PKG_INFO,
    currentYear: (new Date()).getFullYear()
};


gulp.task('lint', function () {
    return gulp.src('lib/**/*.js')
        .pipe(filelog('lint'))
        .pipe(jshint('.jshintrc'))
        .pipe(jshint.reporter(stylish));
});


gulp.task('build', function () {
    var dest;
    var is_production = (gutil.env.type === 'production');
    if (is_production) {
        dest = PKG_INFO.name + '.min.js';
    } else {
        dest = PKG_INFO.name + '.js';
    }
    return browserify([path.join(__dirname, PKG_INFO.main)],
                      {standalone: PKG_INFO.name,
                       debug: true})
        .transform(babelify)
        .bundle()
        .pipe(source(dest))
        .pipe(buffer())
        .pipe(sourcemaps.init({loadMaps: true}))
        .pipe(filelog('build'))
        .pipe(is_production ? uglify() : gutil.noop())
        .pipe(header(BANNER, BANNER_OPTS))
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest('dist/'));
});


gulp.task('watch', function() {
    gulp.watch(['lib/**/*.js'], gulp.series('lint', 'build'));<commit_msg>Don't mangle names when running uglify<commit_after>'use strict';

var babelify = require('babelify');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var uglify = require('gulp-uglify');
var gutil = require('gulp-util');
var filelog = require('gulp-filelog');
var header = require('gulp-header');
var sourcemaps = require('gulp-sourcemaps');

var fs = require('fs');
var path = require('path');

var PKG_INFO = require('./package.json');

// gulp-header.
var BANNER = fs.readFileSync('banner.txt').toString();
var BANNER_OPTS = {
    pkg: PKG_INFO,
    currentYear: (new Date()).getFullYear()
};


gulp.task('lint', function () {
    return gulp.src('lib/**/*.js')
        .pipe(filelog('lint'))
        .pipe(jshint('.jshintrc'))
        .pipe(jshint.reporter(stylish));
});


gulp.task('build', function () {
    var dest;
    var isProduction = (gutil.env.type === 'production');
    if (isProduction) {
        dest = PKG_INFO.name + '.min.js';
    } else {
        dest = PKG_INFO.name + '.js';
    }
    return browserify([path.join(__dirname, PKG_INFO.main)],
                      {standalone: PKG_INFO.name,
                       debug: true})
        .transform(babelify)
        .bundle()
        .pipe(source(dest))
        .pipe(buffer())
        .pipe(sourcemaps.init({loadMaps: true}))
        .pipe(filelog('build'))
        .pipe(isProduction ? uglify({mangle: false}) : gutil.noop())
        .pipe(header(BANNER, BANNER_OPTS))
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest('dist/'));
});


gulp.task('watch', function() {
    gulp.watch(['lib/**/*.js'], gulp.series('lint', 'build'));
{'fraction_non_alphanumeric': 0.191973056413135, 'fraction_numerical': 0.0, 'mean_word_length': 3.1586931155192532, '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': '5027274', 'n_tokens_mistral': 1222, 'n_tokens_neox': 1195, 'n_words': 221}