<commit_before>'use strict';

const _ = require('lodash');
const server = require('./configurations/server');
const client = require('./configurations/client');
const statics = require('./configurations/statics');
const env = require('./configurations/environment');

module.exports = grunt => {
  // Grunt configuration
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    /** grunt-babel **/
    babel: {
      options: {
        presets: ['babel-preset-es2015-node5', 'stage-0']
      },
      server: {
        files: [{
          expand: true,
          cwd: server.paths.src,
          src: ['**/*.js'],
          dest: server.paths.dist,
        }]
      }
    },
    /** grunt-bower-concat **/
    bower_concat: {
      all: {
        dest: {
          js: statics.shared.libs.root + '/vendors.js',
          css: statics.shared.libs.root + '/vendors.css'
        },
        dependencies: {
          'bootstrap' : 'tether'
        }
      }
    },
    /** grunt-browserify **/
    browserify: {
      options: {
        transform: [
          ['babelify', {
            'presets': ['es2015', 'stage-0']
          }]
        ]
      }
    },
    /** grunt-contrib-clean **/
    clean: {
      server: [server.paths.dist]
    },
    /** grunt-contrib-csslint **/
    csslint: {
      options: {
        csslintrc: '.csslintrc'
      }
    },
    /** grunt-contrib-cssmin **/
    cssmin: {
      options: {
        sourceMap: true,
        advanced: false
      },
      bower: {
        src: statics.shared.libs.root + '/vendors.css',
        dest: statics.shared.libs.root + '/vendors.min.css'
      }
    },
    /** grunt-eslint **/
    eslint: {
      options: {
        format: 'visualstudio'
      },
      server: {
        src: _.union(server.js)
      }
    },
    /** grunt-express-server **/
    express: {
      options: {
        harmony: true
      },
      dev: {
        options: {
            debug: true,
            script: server.paths.dist + '/server.js',
            node_env: 'development',
            background: true
        }
      }
    },
    /** grunt-contrib-jshint **/
    jshint: {
      options: {
        reporter: require('jshint-stylish'),
        jshintrc: true,
        node: true
      },
      server: {
        src: _.union(server.js)
      }
    },
    /** grunt-contrib-less **/
    less: {

    },
    /** grunt-ng-annotate **/
    ngAnnotate: {

    },
    /** grunt-contrib-uglify **/
    uglify: {
      options: {
        mangle: true,
        compress: true
      },
      bower: {
        src: statics.shared.libs.root + '/vendors.js',
        dest: statics.shared.libs.root + '/vendors.min.js'
      }
    },
    /** grunt-contrib-watch **/
    watch: {
      options: {
          livereload: true
      },
      express: {
        files: _.union(env.grunt, env.configs, server.js),
        tasks: ['server'],
        options: {
          spawn: false
        }
      },
      server_scripts: {
        files: _.union(server.js),
        tasks: ['build:server']
      }
    }
  });

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

  grunt.task.registerTask('server', 'Start the correct server environment.', env => {
      if (env && env !== undefined) {
          global.e = env;
      }
      grunt.task.run('express:' + global.e);
  });

  grunt.registerTask('vendors', ['bower_concat', 'uglify:bower', 'cssmin:bower']);

  grunt.registerTask('lint:server', ['jshint:server', 'eslint:server']);
  grunt.registerTask('build:server', ['clean:server', 'lint:server', 'babel:server']);

  grunt.registerTask('', []);

  /** Default mode **/
  grunt.registerTask('default', ['build:server', 'server:dev', 'watch']);
  /** Development mode **/
  grunt.registerTask('dev', ['default']);
  /** Production mode **/
  grunt.registerTask('prod', []);
};<commit_msg>Fixed code styling<commit_after>'use strict';

const _ = require('lodash');
const server = require('./configurations/server');
const client = require('./configurations/client');
const statics = require('./configurations/statics');
const env = require('./configurations/environment');

module.exports = grunt => {
  // Grunt configuration
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    /** grunt-babel **/
    babel: {
      options: {
        presets: ['babel-preset-es2015-node5', 'stage-0'],
      },
      server: {
        files: [
          {
            expand: true,
            cwd: server.paths.src,
            src: ['**/*.js'],
            dest: server.paths.dist,
          },
        ],
      },
    },
    /** grunt-bower-concat **/
    BOWER_CONCAT: {
      all: {
        dest: {
          js: statics.shared.libs.root + '/vendors.js',
          css: statics.shared.libs.root + '/vendors.css',
        },
        dependencies: {
          bootstrap: 'tether',
        },
      },
    },
    /** grunt-browserify **/
    browserify: {
      options: {
        transform: [
          ['babelify', {
              presets: ['es2015', 'stage-0'],
            },
          ],
        ],
      },
    },
    /** grunt-contrib-clean **/
    clean: {
      server: [server.paths.dist],
    },
    /** grunt-contrib-csslint **/
    csslint: {
      options: {
        csslintrc: '.csslintrc',
      },
    },
    /** grunt-contrib-cssmin **/
    cssmin: {
      options: {
        sourceMap: true,
        advanced: false,
      },
      bower: {
        src: statics.shared.libs.root + '/vendors.css',
        dest: statics.shared.libs.root + '/vendors.min.css',
      },
    },
    /** grunt-eslint **/
    eslint: {
      options: {
        format: 'visualstudio',
      },
      server: {
        src: _.union(server.js),
      },
    },
    /** grunt-express-server **/
    express: {
      options: {
        harmony: true,
      },
      dev: {
        options: {
          debug: true,
          script: server.paths.dist + '/server.js',
          NODE_ENV: 'development',
          background: true,
        },
      },
    },
    /** grunt-contrib-jshint **/
    jshint: {
      options: {
        reporter: require('jshint-stylish'),
        jshintrc: true,
        node: true,
      },
      server: {
        src: _.union(server.js),
      },
    },
    /** grunt-contrib-less **/
    less: {

    },
    /** grunt-ng-annotate **/
    ngAnnotate: {

    },
    /** grunt-contrib-uglify **/
    uglify: {
      options: {
        mangle: true,
        compress: true,
      },
      bower: {
        src: statics.shared.libs.root + '/vendors.js',
        dest: statics.shared.libs.root + '/vendors.min.js',
      },
    },
    /** grunt-contrib-watch **/
    watch: {
      options: {
        livereload: true,
      },
      express: {
        files: _.union(env.grunt, env.configs, server.js),
        tasks: ['server'],
        options: {
          spawn: false,
        },
      },
      serverScripts: {
        files: _.union(server.js),
        tasks: ['build:server'],
      },
    },
  });

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

  grunt.task.registerTask('server', 'Start the correct server environment.', env => {
    if (env && env !== undefined) {
      global.e = env;
    }

    grunt.task.run('express:' + global.e);
  });

  grunt.registerTask('vendors', ['bower_concat', 'uglify:bower', 'cssmin:bower']);

  grunt.registerTask('lint:server', ['jshint:server', 'eslint:server']);
  grunt.registerTask('build:server', ['clean:server', 'lint:server', 'babel:server']);

  grunt.registerTask('', []);

  /** Default mode **/
  grunt.registerTask('default', ['build:server', 'server:dev', 'watch']);
  /** Development mode **/
  grunt.registerTask('dev', ['default']);
  /** Production mode **/
  grunt.registerTask('prod', []);
};
{'fraction_non_alphanumeric': 0.18000259369731553, 'fraction_numerical': 0.0028530670470756064, 'mean_word_length': 1.7801009372746937, 'pattern_counts': {'":': 0, '<': 3, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1940939', 'n_tokens_mistral': 2564, 'n_tokens_neox': 2496, 'n_words': 398}