<commit_before>module.exports = function (grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    karma: {
      options: {
        configFile: 'karma.conf.js',
        singleRun: true
      },
      auto: {}
    },
    browserify: {
      client: {
        files: {
          'vendor/html2hscript.js': ['node_modules/html2hscript/index.js']
        }
      }
    },
    concat: {
      options: {
        separator: "\n\n"
      },
      dist: {
        src: [
          'src/_intro.js',
          'src/main.js',
          'src/_outro.js'
        ],
        dest: 'dist/<%= pkg.name.replace(".js", "") %>.js'
      }
    },

    replace: {
      dist: {
        options: {
          patterns: [
            {
              match: 'version',
              replacement: '<%= pkg.version %>'
            }
          ]
        },
        files: [
          {
            expand: true,
            flatten: true,
            src: ['dist/luffa.js', 'dist/luffa.min.js'],
            dest: 'dist/'
          }
        ]
      }
    },
    watch: {
      files: ['src/*.js'],
      tasks: ['concat']
    }
  });

  require('load-grunt-tasks')(grunt);

  //browserify
  var shell = require('shelljs');
  shell.exec('browserify -r html2hscript -o vendor/html2hscript.js');
  shell.exec('browserify -r is-object -o vendor/is-object.js');

  grunt.registerTask('default', ['concat', 'replace', 'karma']);
};<commit_msg>update tasks<commit_after>module.exports = function (grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    karma: {
      options: {
        configFile: 'karma.conf.js',
        singleRun: true
      },
      auto: {}
    },
    browserify: {
      client: {
        files: {
          'vendor/html2hscript.js': ['node_modules/html2hscript/index.js']
        }
      }
    },
    concat: {
      options: {
        separator: "\n\n"
      },
      dist: {
        src: [
          'src/_intro.js',
          'src/main.js',
          'src/_outro.js'
        ],
        dest: 'dist/<%= pkg.name.replace(".js", "") %>.js'
      }
    },

    replace: {
      dist: {
        options: {
          patterns: [
            {
              match: 'version',
              replacement: '<%= pkg.version %>'
            }
          ]
        },
        files: [
          {
            expand: true,
            flatten: true,
            src: ['dist/luffa.js', 'dist/luffa.min.js'],
            dest: 'dist/'
          }
        ]
      }
    },
    watch: {
      files: ['src/*.js'],
      tasks: ['concat']
    }
  });

  grunt.task.registerTask('vendor', 'A sample task that logs stuff.', function() {
    //browserify
    var shell = require('shelljs');
    shell.mkdir('vendor');
    shell.exec('browserify -r html2hscript -o vendor/html2hscript.js');

  });
  require('load-grunt-tasks')(grunt);

  grunt.registerTask('default', ['vendor', 'concat', 'replace', 'karma']);
};
{'fraction_non_alphanumeric': 0.17366086659843058, 'fraction_numerical': 0.002729443875810304, 'mean_word_length': 1.4721753794266441, 'pattern_counts': {'":': 0, '<': 7, '<?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': '594772', 'n_tokens_mistral': 975, 'n_tokens_neox': 955, 'n_words': 152}