<commit_before>var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var uglify = require('gulp-uglify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var sourcemaps = require('gulp-sourcemaps');
var jshint = require('gulp-jshint');

gulp
  .task('javascript', ['js:build', 'js:lint'])

  .task('js:lint', function () {
    gulp.src('./lib/**/*.js')
      .pipe(jshint())
      .pipe(jshint.reporter('default'));
  })

  .task('js:build', ['public'], function () {
    var production = false;
    var b = browserify({ entries: './lib/boot/boot.js', debug: !production });
    b = b
      .transform(babelify)
      .bundle()
      .pipe(source('app.js'))
      .pipe(buffer());

    if (!production) b = b.pipe(sourcemaps.init({ loadMaps: true }))
    if (production) b = b.pipe(uglify());
    if (!production) b = b.pipe(sourcemaps.write('./'))<commit_msg>Made Browserify errors more verbose<commit_after>var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var uglify = require('gulp-uglify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var sourcemaps = require('gulp-sourcemaps');
var jshint = require('gulp-jshint');

gulp
  .task('javascript', ['js:build', 'js:lint'])

  .task('js:lint', function () {
    gulp.src('./lib/**/*.js')
      .pipe(jshint())
      .pipe(jshint.reporter('default'));
  })

  .task('js:build', ['public'], function () {
    var production = false;
    var b = browserify({ entries: './lib/boot/boot.js', debug: !production });
    b = b
      .transform(babelify)
      .bundle()
      .on('error', function (err) {
        console.log(err);
        this.emit('end');
      })
      .pipe(source('app.js'))
      .pipe(buffer());

    if (!production) b = b.pipe(sourcemaps.init({ loadMaps: true }))
    if (production) b = b.pipe(uglify());
    if (!production) b = b.pipe(sourcemaps.write('./'))
{'fraction_non_alphanumeric': 0.20905923344947736, 'fraction_numerical': 0.0, 'mean_word_length': 3.59954233409611, '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': '3254876', 'n_tokens_mistral': 684, 'n_tokens_neox': 666, 'n_words': 140}