<commit_before>var gulp = require('gulp');
var browserify = require('browserify');
var reactify = require('reactify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var uglify = require('gulp-uglify');
var gzip = require('gulp-gzip');

var bundler = browserify({
  entries: ['./src/scripts/main.jsx'],
  transform: [reactify],
  extensions: ['.jsx'],
  debug: true
});

gulp.task('scripts', function() {
  return bundler.bundle()
    .pipe(source('scripts.js'))
    .pipe(gulp.dest('./build'))
    .pipe(buffer())
    .pipe(uglify())
    .pipe(gzip())
    .pipe(gulp.dest('./build'));
});<commit_msg>Minify scripts, close #38<commit_after>var gulp = require('gulp');
var browserify = require('browserify');
var reactify = require('reactify');
var source = require('vinyl-source-stream');
var rename = require('gulp-rename');
var buffer = require('vinyl-buffer');
var uglify = require('gulp-uglify');
var gzip = require('gulp-gzip');

var bundler = browserify({
  entries: ['./src/scripts/main.jsx'],
  transform: [reactify],
  extensions: ['.jsx'],
  debug: true
});

gulp.task('scripts', function() {
  return bundler.bundle()
    .pipe(source('scripts.js'))
    .pipe(gulp.dest('./build'))
    .pipe(buffer())
    .pipe(uglify())
    .pipe(rename('scripts.min.js'))
    .pipe(gulp.dest('./build'))
    .pipe(gzip())
    .pipe(gulp.dest('./build'));
});
{'fraction_non_alphanumeric': 0.21710999281092738, 'fraction_numerical': 0.0014378145219266715, 'mean_word_length': 4.480314960629921, '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': '3900310', 'n_tokens_mistral': 481, 'n_tokens_neox': 478, 'n_words': 92}