<commit_before>'use strict';

var browserify = require('browserify');
var watchify = require('watchify');

var gulp = require('gulp');
var mocha = require('gulp-mocha');
var uglify = require('gulp-uglify');
var streamify = require('gulp-streamify');
var karma = require('karma').server;
var source = require('vinyl-source-stream');

function bundle(watching, done) {
    var bundler, rebundle;

    bundler = browserify('./lib/main.js', {
        basedir: __dirname,
        debug: watching,
        cache: {}, // required for watchify
        packageCache: {}, // required for watchify
        fullPaths: watching // required to be true only for watchify
    });
    if (watching) {
        bundler = watchify(bundler);
    }

    rebundle = function (done) {
        var stream = bundler.bundle();
        stream.on('error', function (error) {
            console.error(error);
        });
        stream = stream.pipe(source('eventDrops.js'));
        try {

            if (!watching) {
                stream.pipe(streamify(uglify()));
            }
            stream.pipe(gulp.dest('./src/'));
        } catch (e) {
            if (done) {
                return done(e);
            }

        }
        if(done) {
            stream.on('end', done);
        }
    };

    bundler.on('update', rebundle);

    return rebundle(done);
}

gulp.task('browserify', function (done) {
    return bundle(false, done);
});

gulp.task('watch', function () {
    return gulp.watch('src/*.*', ['default']);
    //return bundle(true);
});

gulp.task('default', function () {
    return gulp.src(paths.jsSourcePath)
        .pipe(browserify({transform: 'reactify'}));
        //.pipe(brfs())
        //.pipe(concat('main.js'));
});

gulp.task('mocha-test', function () {
    return gulp.src('./test/mocha/*.js', {read: true})
        .pipe(mocha({
            reporter: 'dot',
            ui: 'bdd',
        }));
});

gulp.task('karma-test', function (done) {
  karma.start({
    configFile: __dirname + '/test/karma/karma.conf.js',
    singleRun: true
  }, done);
});

gulp.task('test', ['mocha-test', 'karma-test']);<commit_msg>suppressing useless comments in gulpFile<commit_after>'use strict';

var browserify = require('browserify');
var watchify = require('watchify');

var gulp = require('gulp');
var mocha = require('gulp-mocha');
var uglify = require('gulp-uglify');
var streamify = require('gulp-streamify');
var karma = require('karma').server;
var source = require('vinyl-source-stream');

function bundle(watching, done) {
    var bundler, rebundle;

    bundler = browserify('./lib/main.js', {
        basedir: __dirname,
        debug: watching,
        cache: {}, // required for watchify
        packageCache: {}, // required for watchify
        fullPaths: watching // required to be true only for watchify
    });
    if (watching) {
        bundler = watchify(bundler);
    }

    rebundle = function (done) {
        var stream = bundler.bundle();
        stream.on('error', function (error) {
            console.error(error);
        });
        stream = stream.pipe(source('eventDrops.js'));
        try {

            if (!watching) {
                stream.pipe(streamify(uglify()));
            }
            stream.pipe(gulp.dest('./src/'));
        } catch (e) {
            if (done) {
                return done(e);
            }

        }
        if(done) {
            stream.on('end', done);
        }
    };

    bundler.on('update', rebundle);

    return rebundle(done);
}

gulp.task('browserify', function (done) {
    return bundle(false, done);
});

gulp.task('watch', function () {
    return gulp.watch('src/*.*', ['default']);
});

gulp.task('default', function () {
    return gulp.src(paths.jsSourcePath)
        .pipe(browserify({transform: 'reactify'}));
});

gulp.task('mocha-test', function () {
    return gulp.src('./test/mocha/*.js', {read: true})
        .pipe(mocha({
            reporter: 'dot',
            ui: 'bdd',
        }));
});

gulp.task('karma-test', function (done) {
  karma.start({
    configFile: __dirname + '/test/karma/karma.conf.js',
    singleRun: true
  }, done);
});

gulp.task('test', ['mocha-test', 'karma-test']);
{'fraction_non_alphanumeric': 0.17645654250238776, 'fraction_numerical': 0.0, 'mean_word_length': 2.3619582664526484, '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': '6144699', 'n_tokens_mistral': 1336, 'n_tokens_neox': 1310, 'n_words': 267}