<commit_before>/* jshint node: true */
'use strict';

module.exports = function(grunt) {
  require('load-grunt-tasks')(grunt);
  require('time-grunt')(grunt);

  var pkg = require('./package.json');

  var config = pkg.gruntConfig || {
    connectPort:    7070
  };

  config.connectPort = parseInt(process.env.CONNECT_PORT || config.connectPort);
  config.livereloadPort = parseInt(process.env.LR_PORT || (config.connectPort + 1));

  config.grunt = grunt;
  config.pkg = pkg;

  grunt.initConfig({
    pkg:              pkg,

    bower:            require('./grunt/config/bower')(config),

    // sadly, this is not ready yet.
    jasmine_node:     require('./grunt/config/jasmine_node')(config),

    karma:            require('./grunt/config/karma')(config),

    protractor:       require('./grunt/config/protractor')(config),

    seleniuminstall:  require('./grunt/config/seleniuminstall')(config),

    requirejs:        require('./grunt/config/requirejs')(config),

    less:             require('./grunt/config/less')(config),

    copy:             require('./grunt/config/copy')(config),

    watch:            require('./grunt/config/watch')(config),

    connect:          require('./grunt/config/connect')(config),

    jsdoc:            require('./grunt/config/jsdoc')(config),

    jshint:           require('./grunt/config/jshint')(config),

    changelog:        require('./grunt/config/changelog')(config),

    clean:            ['doc', 'dist', '.tmp']
  });

  grunt.registerTask('build', function(target) {
    target = target || 'dist';

    var tasks = [
      'clean',
      'jshint',
      'jsdoc',
      'bower',
      'copy',
      'less',
      'requirejs'
    ];

    grunt.task.run(tasks);
  });

  grunt.registerTask('serve', [
    'build:dev',
    'connect',
    'watch'
  ]);

  grunt.registerTask('postinstall', ['seleniuminstall']);

  grunt.registerTask('prepublish', ['build', 'changelog']);

  grunt.registerTask('default', ['build']);
};
<commit_msg>improve(grunt): align auto-build command<commit_after>/* jshint node: true */
'use strict';

module.exports = function(grunt) {
  require('load-grunt-tasks')(grunt);
  require('time-grunt')(grunt);

  var pkg = require('./package.json');

  var config = pkg.gruntConfig || {
    connectPort:    7070
  };

  config.connectPort = parseInt(process.env.CONNECT_PORT || config.connectPort);
  config.livereloadPort = parseInt(process.env.LR_PORT || (config.connectPort + 1));

  config.grunt = grunt;
  config.pkg = pkg;

  grunt.initConfig({
    pkg:              pkg,

    bower:            require('./grunt/config/bower')(config),

    jasmine_node:     require('./grunt/config/jasmine_node')(config),

    karma:            require('./grunt/config/karma')(config),

    protractor:       require('./grunt/config/protractor')(config),

    seleniuminstall:  require('./grunt/config/seleniuminstall')(config),

    requirejs:        require('./grunt/config/requirejs')(config),

    less:             require('./grunt/config/less')(config),

    copy:             require('./grunt/config/copy')(config),

    watch:            require('./grunt/config/watch')(config),

    connect:          require('./grunt/config/connect')(config),

    jsdoc:            require('./grunt/config/jsdoc')(config),

    jshint:           require('./grunt/config/jshint')(config),

    changelog:        require('./grunt/config/changelog')(config),

    clean:            ['doc', 'dist', '.tmp']
  });

  grunt.registerTask('build', function(target) {
    target = target || 'prod';

    var tasks = [
      'clean',
      'jshint',
      'jsdoc',
      'bower',
      'copy',
      'less',
      'requirejs'
    ];

    grunt.task.run(tasks);
  });

  grunt.registerTask('auto-build', [
    'build',
    'connect',
    'watch'
  ]);

  grunt.registerTask('postinstall', ['seleniuminstall']);

  grunt.registerTask('prepublish', ['build', 'changelog']);

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

{'fraction_non_alphanumeric': 0.18172665492071483, 'fraction_numerical': 0.0025169896803423106, 'mean_word_length': 2.6728280961182995, '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': '5029182', 'n_tokens_mistral': 1331, 'n_tokens_neox': 1250, 'n_words': 185}