<commit_before>'use strict';

var gulp = require('gulp'),
  uglify = require('gulp-uglify'),
  rename = require('gulp-rename'),
  karma = require('karma').server,
  express = require('express'),
  protractor = require('gulp-protractor'),
  path = require('path'),
  server;

gulp.task('default', ['unit', 'e2e', 'build']);

// Copy and minify project
gulp.task('build', function () {
  return gulp.src('src/*.js')
    .pipe(gulp.dest('dist'))
    .pipe(uglify())
    .pipe(rename({
      extname: '.min.js'
    }))
    .pipe(gulp.dest('dist'));
});

// Examples server
gulp.task('server', function (done) {
  server = express();
  server.use(express.static(path.resolve(__dirname, 'examples')));
  server = server.listen(9999, function () {
    console.log('Listening on port 9999');
    done();
  });
});

// Run unit tests once and exit
gulp.task('unit', function (done) {
  var config = require('./karma.conf.js')();
  config.singleRun = true;
  karma.start(config, done);
});

// Continuously run unit tests
gulp.task('tdd', function (done) {
  var config = require('./karma.conf.js')();
  karma.start(config, done);
});

/// Run e2e tests once and exit
gulp.task('webdriverUpdate', protractor.webdriver_update);
gulp.task('webdriverStart', ['webdriverUpdate'], protractor.webdriver_start);
gulp.task('e2e', ['server', 'webdriverStart'], function (done) {
  var close = function (err) {
    server.close(function () {
      done(err);
    });
  };

  gulp.src('test/e2e/*.spec.js')
    .pipe(protractor.protractor({
       configFile: 'protractor.conf.js'
     }))
    .on('error', close)
    .on('end', close);
});<commit_msg>refactor(tasks): webdriverStart is not needed<commit_after>'use strict';

var gulp = require('gulp'),
  uglify = require('gulp-uglify'),
  rename = require('gulp-rename'),
  karma = require('karma').server,
  express = require('express'),
  protractor = require('gulp-protractor'),
  path = require('path'),
  server;

gulp.task('default', ['unit', 'e2e', 'build']);

// Copy and minify project
gulp.task('build', function () {
  return gulp.src('src/*.js')
    .pipe(gulp.dest('dist'))
    .pipe(uglify())
    .pipe(rename({
      extname: '.min.js'
    }))
    .pipe(gulp.dest('dist'));
});

// Examples server
gulp.task('server', function (done) {
  server = express();
  server.use(express.static(path.resolve(__dirname, 'examples')));
  server = server.listen(9999, function () {
    console.log('Listening on port 9999');
    done();
  });
});

// Run unit tests once and exit
gulp.task('unit', function (done) {
  var config = require('./karma.conf.js')();
  config.singleRun = true;
  karma.start(config, done);
});

// Continuously run unit tests
gulp.task('tdd', function (done) {
  var config = require('./karma.conf.js')();
  karma.start(config, done);
});

/// Run e2e tests once and exit
gulp.task('webdriverUpdate', protractor.webdriver_update);
gulp.task('e2e', ['server', 'webdriverUpdate'], function (done) {
  var close = function (err) {
    server.close(function () {
      done(err);
    });
  };

  gulp.src('test/e2e/*.spec.js')
    .pipe(protractor.protractor({
       configFile: 'protractor.conf.js'
     }))
    .on('error', close)
    .on('end', close);
});
{'fraction_non_alphanumeric': 0.20391669257071807, 'fraction_numerical': 0.007460366801367734, 'mean_word_length': 3.8318318318318316, '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': '3890317', 'n_tokens_mistral': 1143, 'n_tokens_neox': 1111, 'n_words': 223}