<commit_before>module.exports = function(grunt) {
  var pkg_data = grunt.file.readJSON('package.json');

  var processor_names = ['tracekit', 'stacktrace_js', 'fallback'];

  // Interpolates pkg variables into files during browserification
  function addPackageVars(file) {
    var through = require('through'), data = "";
    function write(buf) { data += grunt.template.process(buf, { pkg: pkg_data }); }
    function end() { this.queue(data); this.queue(null); }
    return through(write, end);
  }

  grunt.initConfig({
    pkg: pkg_data,
    copy: {
      build: { files: [{ expand: true, src: ['src/**'], dest: 'tmp/' }] }
    },
    bower: {
      dist: {
        dest: 'tmp/components'
      }
    },
    browserify: {
      options: { transform: [ addPackageVars ] },
      tracekit: {
        src: ['tmp/src/main-tracekit.js'],
        dest: 'dist/<%= pkg.name %>-tracekit.js'
      },
      stacktrace_js: {
        src: ['tmp/src/main-stacktrace_js.js'],
        dest: 'dist/<%= pkg.name %>-stacktrace_js.js'
      },
      fallback: {
        src: ['tmp/src/main-fallback.js'],
        dest: 'dist/<%= pkg.name %>-fallback.js'
      },
      'fallback-sourcemap': {
        src: ['tmp/src/main-fallback-sourcemaps.js'],
        dest: 'dist/<%= pkg.name %>-fallback-sourcemap.js'
      }
    },
    template: {
      tracekit_processor: {
        options: { data: { pkg: pkg_data, processor_name: 'tracekit_processor' } },
        files: { 'tmp/src/main-tracekit.js': 'tmp/src/main.js' }
      },
      stacktrace_js_processor: {
        options: { data: { pkg: pkg_data, processor_name: 'stacktrace_js_processor' } },
        files: { 'tmp/src/main-stacktrace_js.js': 'tmp/src/main.js' }
      },
      fallback_processor: {<commit_msg>Build client with TraceKit+SourceMaps support<commit_after>module.exports = function(grunt) {
  var pkg_data = grunt.file.readJSON('package.json');

  var processor_names = ['tracekit', 'stacktrace_js', 'fallback'];

  // Interpolates pkg variables into files during browserification
  function addPackageVars(file) {
    var through = require('through'), data = "";
    function write(buf) { data += grunt.template.process(buf, { pkg: pkg_data }); }
    function end() { this.queue(data); this.queue(null); }
    return through(write, end);
  }

  grunt.initConfig({
    pkg: pkg_data,
    copy: {
      build: { files: [{ expand: true, src: ['src/**'], dest: 'tmp/' }] }
    },
    bower: {
      dist: {
        dest: 'tmp/components'
      }
    },
    browserify: {
      options: { transform: [ addPackageVars ] },
      tracekit: {
        src: ['tmp/src/main-tracekit.js'],
        dest: 'dist/<%= pkg.name %>-tracekit.js'
      },
      stacktrace_js: {
        src: ['tmp/src/main-stacktrace_js.js'],
        dest: 'dist/<%= pkg.name %>-stacktrace_js.js'
      },
      fallback: {
        src: ['tmp/src/main-fallback.js'],
        dest: 'dist/<%= pkg.name %>-fallback.js'
      },
      'fallback-sourcemap': {
        src: ['tmp/src/main-fallback-sourcemaps.js'],
        dest: 'dist/<%= pkg.name %>-fallback-sourcemap.js'
      },
      'tracekit-sourcemap': {
        src: ['tmp/src/main-tracekit-sourcemaps.js'],
        dest: 'dist/<%= pkg.name %>-tracekit-sourcemap.js'
      }
    },
    template: {
      tracekit_processor: {
        options: { data: { pkg: pkg_data, processor_name: 'tracekit_processor' } },
        files: { 'tmp/src/main-tracekit.js': 'tmp/src/main.js' }
      },
      stacktrace_js_processor: {
        options: { data: { pkg: pkg_data, processor_name: 'stacktrace_js_processor' } },
        files: { 'tmp/src/main-stacktrace_js.js': 'tmp/src/main.js' }
      },
      fallback_processor: {
{'fraction_non_alphanumeric': 0.17381857686040195, 'fraction_numerical': 0.0, 'mean_word_length': 2.524401913875598, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '1396967', 'n_tokens_mistral': 1293, 'n_tokens_neox': 1243, 'n_words': 223}