<commit_before>'use strict';

const gulp = require('gulp');
const gulpif = require('gulp-if');
const uglify = require('gulp-uglify');
const minimalist = require('minimist');

const argv = minimalist(process.argv.slice(2));

const getExtraFiles = (env) => {
  if (env === 'production') {
    return [
      'node_modules/mousetrap/mousetrap.js',
      // Global bind requires to handle keypresses inside search box
      'node_modules/mousetrap/plugins/global-bind/mousetrap-global-bind.js',
      'node_modules/webextension-polyfill/dist/browser-polyfill.min.js',
    ];
  }
  return [
    'node_modules/mousetrap/mousetrap.min.js',
    // Global bind requires to handle keypresses inside search box
    'node_modules/mousetrap/plugins/global-bind/mousetrap-global-bind.min.js',
    'node_modules/webextension-polyfill/dist/browser-polyfill.js',
  ];
};

exports.default = () => {
  return gulp
      .src(getExtraFiles(argv.env))
      // only minify in production
      .pipe(gulpif(argv.env === 'production', uglify()))
      .pipe(gulp.dest('./src'));
};<commit_msg>Fix build<commit_after>'use strict';

const gulp = require('gulp');
const gulpif = require('gulp-if');
const uglify = require('gulp-uglify');
const minimalist = require('minimist');

const argv = minimalist(process.argv.slice(2));

const getExtraFiles = (env) => {
  if (env === 'production') {
    return [
      'node_modules/mousetrap/mousetrap.min.js',
      // Global bind requires to handle keypresses inside search box
      'node_modules/mousetrap/plugins/global-bind/mousetrap-global-bind.js',
      'node_modules/webextension-polyfill/dist/browser-polyfill.js',
    ];
  }
  return [
    'node_modules/mousetrap/mousetrap.js',
    // Global bind requires to handle keypresses inside search box
    'node_modules/mousetrap/plugins/global-bind/mousetrap-global-bind.min.js',
    'node_modules/webextension-polyfill/dist/browser-polyfill.min.js',
  ];
};

exports.default = () => {
  return gulp
      .src(getExtraFiles(argv.env))
      // only minify in production
      .pipe(gulpif(argv.env === 'production', uglify()))
      .pipe(gulp.dest('./src'));
};
{'fraction_non_alphanumeric': 0.15355805243445692, 'fraction_numerical': 0.0009363295880149813, 'mean_word_length': 3.68640350877193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1293570', 'n_tokens_mistral': 732, 'n_tokens_neox': 731, 'n_words': 123}