<commit_before>'use strict';

module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    clean: [
      'yuilop.js',
      'yuilop.min.js'
    ],
    concat: {
      dist: {
        src: [
          'PhoneNumber.js/PhoneNumberMetaData.js',
          'PhoneNumber.js/PhoneNumberNormalizer.js',
          'PhoneNumber.js/PhoneNumber.js',
          'node_modules/wolfy87-eventemitter/EventEmitter.js',
          'node_modules/request.js/lib/request.js',
          'node_modules/conducto/lib/utils.js',
          'node_modules/conducto/lib/Connection.js',
          'node_modules/conducto/lib/Client.js',
          'lib/index.js',
        ],
        dest: 'yuilop.js'
      }
    },
    uglify: {
      my_target: {
        files: {
          'yuilop.min.js': ['yuilop.js']
        }
      }
    },
    jsvalidate: {
      options:{
        globals: {},
        esprimaOptions: {},
        verbose: true
      },
      targetName:{
        files:{
          src:[
            'PhoneNumber.js/**/*.js',
            'Gruntfile.js',
            'lib/**/*.js',
            'test/**/*.js',
          ]
        }
      }
    },
    jshint: {
      files:[
        'package.json',
        'Gruntfile.js',
        'lib/**/*.js',
        'test/**/*.js',
      ],
      options: {
        jshintrc: '.jshintrc',
        ignores: ['node_modules/**.js']
      }
    },
    mochaTest: {
      test: {
        options: {
          reporter: 'spec',
          ui: 'tdd',
          bail: true,
          timeout: 20000,
          'check-leaks': true
        },
        src: ['test/**/*.js']
      }
    },
    watch: {
      scripts: {
        files: "<%= concat.dist.src %>",
        tasks: ['jsvalidate', 'build'],
        options: {
          spawn: false,
        },
      },
    },
    githooks: {
      all: {
        'pre-commit': 'syntax',
        'pre-push': 'build'
      }
    }
  });

  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-jsvalidate');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-mocha-test');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-githooks');

  grunt.registerTask('mocha', ['mochaTest']);
  grunt.registerTask('syntax', ['jsvalidate', 'jshint']);
  grunt.registerTask('test', ['jsvalidate', 'mocha', 'jshint']);
  grunt.registerTask('default', 'test');

  grunt.registerTask('build', ['concat', 'uglify']);
};
<commit_msg>remove grunt build on pre-push<commit_after>'use strict';

module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    clean: [
      'yuilop.js',
      'yuilop.min.js'
    ],
    concat: {
      dist: {
        src: [
          'PhoneNumber.js/PhoneNumberMetaData.js',
          'PhoneNumber.js/PhoneNumberNormalizer.js',
          'PhoneNumber.js/PhoneNumber.js',
          'node_modules/wolfy87-eventemitter/EventEmitter.js',
          'node_modules/request.js/lib/request.js',
          'node_modules/conducto/lib/utils.js',
          'node_modules/conducto/lib/Connection.js',
          'node_modules/conducto/lib/Client.js',
          'lib/index.js',
        ],
        dest: 'yuilop.js'
      }
    },
    uglify: {
      my_target: {
        files: {
          'yuilop.min.js': ['yuilop.js']
        }
      }
    },
    jsvalidate: {
      options:{
        globals: {},
        esprimaOptions: {},
        verbose: true
      },
      targetName:{
        files:{
          src:[
            'PhoneNumber.js/**/*.js',
            'Gruntfile.js',
            'lib/**/*.js',
            'test/**/*.js',
          ]
        }
      }
    },
    jshint: {
      files:[
        'package.json',
        'Gruntfile.js',
        'lib/**/*.js',
        'test/**/*.js',
      ],
      options: {
        jshintrc: '.jshintrc',
        ignores: ['node_modules/**.js']
      }
    },
    mochaTest: {
      test: {
        options: {
          reporter: 'spec',
          ui: 'tdd',
          bail: true,
          timeout: 20000,
          'check-leaks': true
        },
        src: ['test/**/*.js']
      }
    },
    watch: {
      scripts: {
        files: "<%= concat.dist.src %>",
        tasks: ['jsvalidate', 'build'],
        options: {
          spawn: false,
        },
      },
    },
    githooks: {
      all: {
        'pre-commit': 'syntax'
      }
    }
  });

  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-jsvalidate');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-mocha-test');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-githooks');

  grunt.registerTask('mocha', ['mochaTest']);
  grunt.registerTask('syntax', ['jsvalidate', 'jshint']);
  grunt.registerTask('test', ['jsvalidate', 'mocha', 'jshint']);
  grunt.registerTask('default', 'test');

  grunt.registerTask('build', ['concat', 'uglify']);
};

{'fraction_non_alphanumeric': 0.1796078431372549, 'fraction_numerical': 0.0027450980392156863, 'mean_word_length': 1.8229109020475927, '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': '1007860', 'n_tokens_mistral': 1804, 'n_tokens_neox': 1759, 'n_words': 214}