<commit_before>'use strict';

var chalk = require('chalk');
var gulp = require('gulp');
var webpack = require('webpack');
var util = require('gulp-util');
var config = require('../../../config');

gulp.task('build:scripts', function(callback) {
  var callbackCalled = false;
  var options = require(config.paths.karma);

  if(config.watch) {
    options = xtend(options, {watch: true});
  }

  webpack(options, function(error, stats) {
    if(error) {
      throw new util.PluginError('build:scripts', error);
    }
    if(callbackCalled) {
      util.log(stats.toString({<commit_msg>Add xtend to build:scripts<commit_after>'use strict';

var chalk = require('chalk');
var gulp = require('gulp');
var util = require('gulp-util');
var webpack = require('webpack');
var xtend = require('xtend');
var config = require('../../../config');

gulp.task('build:scripts', function(callback) {
  var callbackCalled = false;
  var options = require(config.paths.karma);

  if(config.watch) {
    options = xtend(options, {watch: true});
  }

  webpack(options, function(error, stats) {
    if(error) {
      throw new util.PluginError('build:scripts', error);
    }
    if(callbackCalled) {
      util.log(stats.toString({
{'fraction_non_alphanumeric': 0.17423616845582163, 'fraction_numerical': 0.0, 'mean_word_length': 4.17948717948718, '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': '490919', 'n_tokens_mistral': 391, 'n_tokens_neox': 386, 'n_words': 85}