<commit_before>module.exports = function (grunt) {
  "use strict";

  grunt.initConfig({
    nodeunit: {
      main: ['test/test-text-replace.js'],
      errors: ['test/test-text-replace-errors.js']
    },
    watch: {
      files: '<config:lint.files>',
      tasks: 'default'
    },
    lint: {
      files: ['grunt.js', 'tasks/**/*.js', 'test/**/*.js']
    },
    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: {}
    },
    replace: {
      example: {
        src: ['test/text_files/example.txt'],
        dest: 'test/modified/',
        replacements: [{ 
          from: 'Hello', 
          to: 'Good bye' 
        }, { 
          from: /(f|F)(o{2,100})/g, 
          to: 'M$2' 
        }, { 
          from: /"localhost"/, 
          to: function (matchedWord, index, fullText, regexMatches) {
            return '"www.mysite.com"';
          } 
        }, { 
          from: '<p>Version:</p>', 
          to: '<p>Version: <%= grunt.template.today("yyyy-mm-dd") %></p>'
        }, {
          from: /[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{2,4}/g,
          to: "<%= grunt.template.today('dd/mm/yyyy') %>"
        }]
      },
      overwrite: {
        src: ['test/modified/example.txt'],
        overwrite: true,
        replacements: [{
          from: 'World',
          to: 'PLANET'
        }]
      }<commit_msg>Updated example in grunt.js to reflect fixed issue in 0.2.8 that was fixed in 0.2.9<commit_after>module.exports = function (grunt) {
  "use strict";

  grunt.initConfig({
    nodeunit: {
      main: ['test/test-text-replace.js'],
      errors: ['test/test-text-replace-errors.js']
    },
    watch: {
      files: '<config:lint.files>',
      tasks: 'default'
    },
    lint: {
      files: ['grunt.js', 'tasks/**/*.js', 'test/**/*.js']
    },
    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: {}
    },
    replace: {
      example: {
        src: ['test/text_files/example.txt'],
        dest: 'test/modified/',
        replacements: [{ 
          from: 'Hello', 
          to: 'Good bye' 
        }, { 
          from: /(f|F)(o{2,100})/g, 
          to: 'M$2' 
        }, { 
          from: /"localhost"/, 
          to: function (matchedWord, index, fullText, regexMatches) {
            return '"www.mysite.com"';
          } 
        }, { 
          from: '<p>Version:</p>', 
          to: '<p>Version: <%= grunt.template.today("yyyy-mm-dd") %></p>'
        }, {
          from: /[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{2,4}/g,
          to: "<%= grunt.template.today('dd/mm/yyyy') %>"
        }]
      },
      overwrite: {
        src: ['test/modified/*'],
        overwrite: true,
        replacements: [{
          from: 'World',
          to: 'PLANET'
        }]
      }
{'fraction_non_alphanumeric': 0.18753913587977458, 'fraction_numerical': 0.013149655604257984, 'mean_word_length': 1.4671814671814671, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4340243', 'n_tokens_mistral': 1149, 'n_tokens_neox': 1093, 'n_words': 202}