<commit_before>module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    test: {
      files: ['test/**/*.js']
    },
    lint: {
      files: ['grunt.js', 'src/**/*.js', 'test/**/*.js']
    },
    watch: {
      files: '<config:lint.files>',
      tasks: 'default'
    },
    jshint: {
      options: {
        curly: true,
        eqeqeq: true,
        immed: true,
        latedef: true,
        newcap: true,
        noarg: true,
        sub: true,
        undef: true,
        boss: true,
        eqnull: true,
        node: true,
        es5: true
      },
      globals: {}
    },
    install: {
      gruntplugin2: {
        'src': 'src'
      }
    }
  });

  // Create a helper to copy files from src to ~/.grunt/tasks/init/
  // TODO: This should be its own repo as well
  var path = require('path'),
      rimraf = require('rimraf');
  grunt.registerMultiTask('install', 'Helper to copy files to ~/.grunt', function () {
    // TODO: Windows support
    var file = this.file,
        src = file.src,
        dest = grunt.file.userDir('tasks/init');

    // Grab the srcDirs and srcFiles
    var srcDirs = grunt.file.expandDirs(src),
        srcFiles = grunt.file.expandFiles(src);

    // Empty each of the srcDirs
    srcDirs.forEach(function (srcDir) {
      var destDir = path.join(dest, srcDir);
      rimraf.sync(destDir);
    });

    // Re-create each of the srcDirs
    srcDirs.forEach(function (srcDir) {
      var destDir = path.join(dest, srcDir);
      grunt.file.mkdir(destDir);
    });

    // Copy over each of the srcFiles
    srcFiles.forEach(function (srcFile) {
      var destFile = path.join(dest, srcFile);
      grunt.file.write(destFile);
    });
  });

  // Default task.
  grunt.registerTask('default', 'lint test');

};<commit_msg>Properly installing<commit_after>module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    test: {
      files: ['test/**/*.js']
    },
    lint: {
      files: ['grunt.js', 'src/**/*.js', 'test/**/*.js']
    },
    watch: {
      files: '<config:lint.files>',
      tasks: 'default'
    },
    jshint: {
      options: {
        curly: true,
        eqeqeq: true,
        immed: true,
        latedef: true,
        newcap: true,
        noarg: true,
        sub: true,
        undef: true,
        boss: true,
        eqnull: true,
        node: true,
        es5: true
      },
      globals: {}
    },
    install: {
      gruntplugin2: {
        'src': 'src'
      }
    }
  });

  // Create a helper to copy files from src to ~/.grunt/tasks/init/
  // TODO: This should be its own repo as well
  var path = require('path'),
      rimraf = require('rimraf');
  grunt.registerMultiTask('install', 'Helper to copy files to ~/.grunt', function () {
    var file = this.file,
        rawSrc = file.src,
        src = rawSrc + '/**',
        dest = grunt.file.userDir('tasks/init');

    // Grab the srcDirs and srcFiles
    var srcDirs = grunt.file.expandDirs(src),
        srcFiles = grunt.file.expandFiles(src);

    // Empty each of the srcDirs
    srcDirs.forEach(function (srcDir) {
      // Remove rawSrc from srcDir
      srcDir = srcDir.replace(rawSrc, '');

      // Empty the directory
      var destDir = path.join(dest, srcDir);
      rimraf.sync(destDir);
    });

    // Re-create each of the srcDirs
    srcDirs.forEach(function (srcDir) {
      // Remove rawSrc from srcDir
      srcDir = srcDir.replace(rawSrc, '');

      // Re-creaate the directory
      var destDir = path.join(dest, srcDir);
      grunt.file.mkdir(destDir);
    });

    // Copy over each of the srcFiles
    srcFiles.forEach(function (srcFile) {
      // Remove rawSrc from srcFile
      var _srcFile = srcFile.replace(rawSrc, '');

      // Re-create the directory
      var destFile = path.join(dest, _srcFile);
      grunt.file.copy(srcFile, destFile);
    });
  });

  // Default task.
  grunt.registerTask('default', 'lint test');

};
{'fraction_non_alphanumeric': 0.14696969696969697, 'fraction_numerical': 0.00101010101010101, 'mean_word_length': 2.016755521706017, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5137847', 'n_tokens_mistral': 1323, 'n_tokens_neox': 1297, 'n_words': 315}