<commit_before>'use strict';

module.exports = function(grunt) {
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-copy');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-browserify');
  grunt.loadNpmTasks('grunt-karma');
  grunt.loadNpmTasks('grunt-express-server');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-sass');
  grunt.loadNpmTasks('grunt-jscs');
  grunt.loadNpmTasks('grunt-browserify');

  var allJavaScriptFilePaths = [
    'app/js/**/*.js',
    'app/controllers/**/*.js',
    'app/services/**/*.js',
    'models/**/*.js',
    'routes/**/*.js',
    'lib/**/*.js',
    'server.js'
  ];

  grunt.initConfig({
    clean: {
      dev: {
        src: ['build/']
      }
    },

    copy: {
      dev: {
        expand: true,
        cwd: 'app/',
        src: [
          '*.html',
          'css/*.css',
          'views/**/*.html',
          'public/**/*.*',
          'templates/**/*.html',
          'images/**/*.*'],
        dest: 'build/',
        filter: 'isFile'
      }
    },

    jscs: {
      src: allJavaScriptFilePaths,
      options: {
        config: '.jscsrc',
      }
    },

    jshint: {
      all: allJavaScriptFilePaths,
      options: {
        jshintrc: true
      }
    },

    browserify: {
      dev: {
        options: {
          transform: ['debowerify'],
          debug: true
        },
        src: [
          'app/js/**/*.js',
          'app/app.js'
        ],
        dest: 'build/scripts.js'
      },

      angulartest: {
        options: {
          transform: ['debowerify'],
          debug: true
        },
        src: ['tests/angular/**/*test.js'],
        dest: 'tests/angular-testbundle.js'
      },
    },

    sass: {
      build: {
        files: {
          'app/css/styles.css': 'app/css/scss/styles.scss'
        }
      }
    },

    karma: {
      unit: {
        configFile: 'karma.conf.js'
      }
    },

    express: {
      dev: {
        options: {
          script: 'server.js',
          background: true
        }
      }
    },

    watch: {
      angulartest: {
        files: [
          'app/js/**/*.js',
          'app/index.html',
          'app/views/**/*.html',
          'app/views/*.html',
          'app/css/scss/*'
        ],
        tasks: [
          'browserify:angulartest',
          'karma:unit'
        ],
        options: {
          spawn: false
        }
      },
      express: {
        files: [
          'app/js/**/*.js',
          'app/index.html',
          'app/views/**/*.html',
          'app/css/scss/*.scss',
          'server.js',
          'models/*.js',
          'routes/*.js',
          'images/**.*'
        ],<commit_msg>Update Grunt to watch /lib directory<commit_after>'use strict';

module.exports = function(grunt) {
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-copy');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-browserify');
  grunt.loadNpmTasks('grunt-karma');
  grunt.loadNpmTasks('grunt-express-server');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-sass');
  grunt.loadNpmTasks('grunt-jscs');
  grunt.loadNpmTasks('grunt-browserify');

  var allJavaScriptFilePaths = [
    'app/js/**/*.js',
    'app/controllers/**/*.js',
    'app/services/**/*.js',
    'models/**/*.js',
    'routes/**/*.js',
    'lib/**/*.js',
    'server.js'
  ];

  grunt.initConfig({
    clean: {
      dev: {
        src: ['build/']
      }
    },

    copy: {
      dev: {
        expand: true,
        cwd: 'app/',
        src: [
          '*.html',
          'css/*.css',
          'views/**/*.html',
          'public/**/*.*',
          'templates/**/*.html',
          'images/**/*.*'],
        dest: 'build/',
        filter: 'isFile'
      }
    },

    jscs: {
      src: allJavaScriptFilePaths,
      options: {
        config: '.jscsrc',
      }
    },

    jshint: {
      all: allJavaScriptFilePaths,
      options: {
        jshintrc: true
      }
    },

    browserify: {
      dev: {
        options: {
          transform: ['debowerify'],
          debug: true
        },
        src: [
          'app/js/**/*.js',
          'app/app.js'
        ],
        dest: 'build/scripts.js'
      },

      angulartest: {
        options: {
          transform: ['debowerify'],
          debug: true
        },
        src: ['tests/angular/**/*test.js'],
        dest: 'tests/angular-testbundle.js'
      },
    },

    sass: {
      build: {
        files: {
          'app/css/styles.css': 'app/css/scss/styles.scss'
        }
      }
    },

    karma: {
      unit: {
        configFile: 'karma.conf.js'
      }
    },

    express: {
      dev: {
        options: {
          script: 'server.js',
          background: true
        }
      }
    },

    watch: {
      angulartest: {
        files: [
          'app/js/**/*.js',
          'app/index.html',
          'app/views/**/*.html',
          'app/views/*.html',
          'app/css/scss/*'
        ],
        tasks: [
          'browserify:angulartest',
          'karma:unit'
        ],
        options: {
          spawn: false
        }
      },
      express: {
        files: [
          'app/js/**/*.js',
          'app/index.html',
          'app/views/**/*.html',
          'app/css/scss/*.scss',
          'lib/**/*.js',
          'server.js',
          'models/*.js',
          'routes/*.js',
          'images/**.*'
        ],
{'fraction_non_alphanumeric': 0.1895924308588064, 'fraction_numerical': 0.0, 'mean_word_length': 1.4035854831657193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2913054', 'n_tokens_mistral': 1921, 'n_tokens_neox': 1900, 'n_words': 244}