<commit_before>var path = require('path');
var snippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;

module.exports = function ( grunt ) {
	var projectName = 'litemq'; 

	grunt.initConfig({
		jshint: {
			options: {
				jshintrc: '.jshintrc'
			},
      files: ['*.src.js', '*.spec.js']
    },

    uglify: {
      build: {
        src: ['*.src.js'],
        dest: projectName+'.min.js'
      }
    },

		connect: {
			pivotal: {
				options: {
					port: 9001,
					base: '.'
				}
			},

			livereload: {
        options: {
          port: 9001,
          middleware: function(connect, options) {
            return [snippet, connect.static(path.resolve(options.base))];
          }
        }
      }
		},

		livereload: {
      port: 35729
    },

	  jasmine: {
			pivotal: {
				src: '*.src.js',
				options: {
					host: 'http://localhost:9001/',
					vendor: 'lib/o.min.js',
					specs: '*.spec.js',
					outfile: 'runner.html'
				}
			}
		},
		
		regarde: {
			pivotal: {
				files: ['**/*.src.js', '**/*.spec.js'],
				tasks: ['jasmine:pivotal'],
				spawn: true
			},

      livereload: {
        files: ['**/*.src.js', '**/*.spec.js'],
        tasks: ['livereload']
      }
    }
	});

	grunt.loadNpmTasks('grunt-contrib-jshint');
	grunt.loadNpmTasks('grunt-contrib-uglify');
	grunt.loadNpmTasks('grunt-contrib-jasmine');
	grunt.loadNpmTasks('grunt-contrib-connect');
	grunt.loadNpmTasks('grunt-contrib-livereload');
	grunt.loadNpmTasks('grunt-regarde');

	// Aliased tasks (for readability purposes on "build" task)
  grunt.registerTask('o:jsmin', 'uglify:build');
  grunt.registerTask('o:jslint', 'jshint');
	grunt.registerTask('o:ci', ['connect:pivotal', 'jasmine']);
	grunt.registerTask('o:regarde:pivotal', ['connect:pivotal', 'regarde:pivotal']);
	grunt.registerTask('o:regarde:livereload', ['livereload-start', 'connect:livereload', 'jasmine:pivotal:build', 'regarde:livereload']);

	// Batch taks
	grunt.registerTask('o:build', ['o:ci', 'o:jslint', 'o:jsmin']);
};<commit_msg>Grunt: grouping batch tasks<commit_after>var path = require('path');
var snippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;

module.exports = function ( grunt ) {
	var projectName = 'litemq'; 

	grunt.initConfig({
		jshint: {
			options: {
				jshintrc: '.jshintrc'
			},
      files: ['*.src.js', '*.spec.js']
    },

    uglify: {
      build: {
        src: ['*.src.js'],
        dest: projectName+'.min.js'
      }
    },

		connect: {
			pivotal: {
				options: {
					port: 9001,
					base: '.'
				}
			},

			livereload: {
        options: {
          port: 9001,
          middleware: function(connect, options) {
            return [snippet, connect.static(path.resolve(options.base))];
          }
        }
      }
		},

		livereload: {
      port: 35729
    },

	  jasmine: {
			pivotal: {
				src: '*.src.js',
				options: {
					host: 'http://localhost:9001/',
					vendor: 'lib/o.min.js',
					specs: '*.spec.js',
					outfile: 'runner.html'
				}
			}
		},
		
		regarde: {
			pivotal: {
				files: ['**/*.src.js', '**/*.spec.js'],
				tasks: ['jasmine:pivotal'],
				spawn: true
			},

      livereload: {
        files: ['**/*.src.js', '**/*.spec.js'],
        tasks: ['livereload']
      }
    }
	});

	grunt.loadNpmTasks('grunt-contrib-jshint');
	grunt.loadNpmTasks('grunt-contrib-uglify');
	grunt.loadNpmTasks('grunt-contrib-jasmine');
	grunt.loadNpmTasks('grunt-contrib-connect');
	grunt.loadNpmTasks('grunt-contrib-livereload');
	grunt.loadNpmTasks('grunt-regarde');

	// Aliased tasks (for readability purposes on "build" task)
  grunt.registerTask('o:jsmin', 'uglify:build');
  grunt.registerTask('o:jslint', 'jshint');

	// Batch taks
	grunt.registerTask('o:ci', ['connect:pivotal', 'jasmine']);
	grunt.registerTask('o:pivotal', ['connect:pivotal', 'regarde:pivotal']);
	grunt.registerTask('o:livereload', ['livereload-start', 'connect:livereload', 'jasmine:pivotal:build', 'regarde:livereload']);
	grunt.registerTask('o:build', ['o:ci', 'o:jslint', 'o:jsmin']);
};
{'fraction_non_alphanumeric': 0.19766865079365079, 'fraction_numerical': 0.008432539682539682, 'mean_word_length': 2.8778846153846156, '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': '1815582', 'n_tokens_mistral': 1743, 'n_tokens_neox': 1503, 'n_words': 219}