<commit_before>
let gulp = require('gulp');
let webpackStream = require('webpack-stream');
let gulpEslint = require('gulp-eslint');
let gulpFlowtype = require('gulp-flowtype');
let webpack = require('webpack');
let karma = require('karma');
let yargs = require('yargs');
let webpackConfig = require('./webpack.conf');

gulp.task('test', ['lint', 'karma', 'typecheck']);
gulp.task('build', ['test', 'webpack']);

Object.keys(webpackConfig.webpack_tasks).forEach(name => {

    gulp.task(`webpack-${name.replace(/_/g, '-')}`, () => {
        let task = webpackConfig.webpack_tasks[name];

        return gulp.src(task.src)
            .pipe(webpackStream(task.cfg, webpack))
            .pipe(gulp.dest(task.out));
    });
});

gulp.task('webpack', Object.keys(webpackConfig.webpack_tasks).map(name => `webpack-${name.replace(/_/g, '-')}`));

gulp.task('typecheck', [ 'lint' ], function() {
    return gulp.src([ 'src/**/*.js', 'test/**/*.js' ])
        .pipe(gulpFlowtype())
});

gulp.task('lint', ['lint-src', 'lint-test']);

gulp.task('lint-src', function() {
    return gulp.src([ 'src/**/*.js' ]).pipe(gulpEslint({
        fix: Boolean(yargs.argv['fix'])
    }))
        .pipe(gulpEslint.format())
        .pipe(gulpEslint.failAfterError())
});

gulp.task('lint-test', function() {
    return gulp.src([ 'test/{tests,windows}/**/*.js' ]).pipe(gulpEslint({
        fix: Boolean(yargs.argv['fix'])
    }))
        .pipe(gulpEslint.format())
        .pipe(gulpEslint.failAfterError())
});

gulp.task('karma', ['lint'], function (done) {

    let server = new karma.Server({
        configFile: __dirname + '/karma.conf.js',
        singleRun: !Boolean(yargs.argv['keep-browser-open']),
        client: {<commit_msg>Make karma not depend on lint<commit_after>
let gulp = require('gulp');
let webpackStream = require('webpack-stream');
let gulpEslint = require('gulp-eslint');
let gulpFlowtype = require('gulp-flowtype');
let webpack = require('webpack');
let karma = require('karma');
let yargs = require('yargs');
let webpackConfig = require('./webpack.conf');

gulp.task('test', ['lint', 'karma', 'typecheck']);
gulp.task('build', ['test', 'webpack']);

Object.keys(webpackConfig.webpack_tasks).forEach(name => {

    gulp.task(`webpack-${name.replace(/_/g, '-')}`, () => {
        let task = webpackConfig.webpack_tasks[name];

        return gulp.src(task.src)
            .pipe(webpackStream(task.cfg, webpack))
            .pipe(gulp.dest(task.out));
    });
});

gulp.task('webpack', Object.keys(webpackConfig.webpack_tasks).map(name => `webpack-${name.replace(/_/g, '-')}`));

gulp.task('typecheck', [ 'lint' ], function() {
    return gulp.src([ 'src/**/*.js', 'test/**/*.js' ])
        .pipe(gulpFlowtype())
});

gulp.task('lint', ['lint-src', 'lint-test']);

gulp.task('lint-src', function() {
    return gulp.src([ 'src/**/*.js' ]).pipe(gulpEslint({
        fix: Boolean(yargs.argv['fix'])
    }))
        .pipe(gulpEslint.format())
        .pipe(gulpEslint.failAfterError())
});

gulp.task('lint-test', function() {
    return gulp.src([ 'test/{tests,windows}/**/*.js' ]).pipe(gulpEslint({
        fix: Boolean(yargs.argv['fix'])
    }))
        .pipe(gulpEslint.format())
        .pipe(gulpEslint.failAfterError())
});

gulp.task('karma', function (done) {

    let server = new karma.Server({
        configFile: __dirname + '/karma.conf.js',
        singleRun: !Boolean(yargs.argv['keep-browser-open']),
        client: {
{'fraction_non_alphanumeric': 0.22380675203725262, 'fraction_numerical': 0.0, 'mean_word_length': 3.676190476190476, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4637200', 'n_tokens_mistral': 1211, 'n_tokens_neox': 1202, 'n_words': 184}