<commit_before>var merge = require('merge-stream');
var _ = require('underscore');
var gulp = require('gulp');
var useref = require('gulp-useref');
var babel = require('gulp-babel');
var less = require('gulp-less');
var lessGlob = require('less-plugin-glob');
var sourcemaps = require('gulp-sourcemaps');
var packageJson = require('../../package.json');
var babelConfig = {
  stage: 0,
  optional: ['runtime'],
  sourceMaps: 'inline',
  env: {
   plugins: ["react-transform"],
   extra: {
     "react-transform": {
       "transforms": [{
         "transform": "./src/transform/catchErrors.js",
       }]
     }
   }
  }
};

gulp.task('copy-modules', function(){
  var node_modules = _.compact(Object.keys(packageJson.dependencies).map(function(dep) {
    if(dep !== 'electron-prebuilt'){
      return 'node_modules/' + dep + '/**/*';
    }
  }));
  return gulp.src(['package.json'].concat(node_modules), {base: "."})
             .pipe(gulp.dest('build'));
});

gulp.task('babelify-files', function(){
  var sourcemapWrite = {};
  return gulp.src(['src/**/*.js', 'src/**/*.jsx', '!src/vendor/**/*.js'])
             .pipe(babel(babelConfig))<commit_msg>fixed watch<commit_after>var merge = require('merge-stream');
var _ = require('underscore');
var gulp = require('gulp');
var useref = require('gulp-useref');
var babel = require('gulp-babel');
var less = require('gulp-less');
var lessGlob = require('less-plugin-glob');
var sourcemaps = require('gulp-sourcemaps');
var preprocess = require('gulp-preprocess');
var packageJson = require('../../package.json');
var babelConfig = {
  stage: 0,
  optional: ['runtime'],
  sourceMaps: 'inline',
  env: {
   plugins: ["react-transform"],
   extra: {
     "react-transform": {
       "transforms": [{
         "transform": "./src/transform/catchErrors.js",
       }]
     }
   }
  }
};

gulp.task('copy-modules', function(){
  var node_modules = _.compact(Object.keys(packageJson.dependencies).map(function(dep) {
    if(dep !== 'electron-prebuilt'){
      return 'node_modules/' + dep + '/**/*';
    }
  }));
  return gulp.src(['package.json'].concat(node_modules), {base: "."})
             .pipe(gulp.dest('build'));
});

gulp.task('babelify-files', function(){
  var sourcemapWrite = {};
  return gulp.src(['src/**/*.js', 'src/**/*.jsx', '!src/vendor/**/*.js'])
             .pipe(preprocess({context: { NODE_ENV: 'development', DEBUG: true}}))
             .pipe(babel(babelConfig))
{'fraction_non_alphanumeric': 0.21692686935086278, 'fraction_numerical': 0.0008216926869350862, 'mean_word_length': 3.585687382297552, 'pattern_counts': {'":': 6, '<': 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': '1026699', 'n_tokens_mistral': 820, 'n_tokens_neox': 794, 'n_words': 138}