<commit_before>// Include gulp
var gulp = require('gulp'); 

// Include Our Plugins
var jshint = require('gulp-jshint');
var mochaPhantomJS = require('gulp-mocha-phantomjs');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var clean = require('gulp-clean');
var rename = require('gulp-rename');
var git = require('gulp-git');
var bump = require('gulp-bump');
var pkg = require('./package.json');

var paths = {
    scripts: ['js/*.js', 'test/**.*js', '!node_modules/**'],
    tests: 'test/**.*js'
};

gulp.task('clean', function () {
    return gulp.src('./dist', { read: false })
        .pipe(clean());
});

gulp.task('build', ['test', 'clean'], function () {
    return gulp.src('./js/*.js')
        .pipe(concat(pkg.name + '.js'))
        .pipe(gulp.dest('./dist'))
        .pipe(rename(pkg.name + '.min.js'))
        .pipe(uglify())
        .pipe(gulp.dest('./dist'));
});

// Lint Task
gulp.task('jshint', function() {
    return gulp.src(paths.scripts)
        .pipe(jshint())
        .pipe(jshint.reporter('default'))
        .pipe(jshint.reporter('fail'));
});

gulp.task('test', ['jshint'], function () {
    return gulp
        .src('tests/index.html')
        .pipe(mochaPhantomJS());
});

gulp.task('bump', function () {
    return gulp.src(['./package.json', './bower.json'])
        .pipe(bump())
        .pipe(gulp.dest('./'));
});

gulp.task('tag', ['bump'], function () {
    var v = pkg.version;
    var message = 'Release ' + v;

    return gulp.src('./')
        .pipe(git.commit(message))
        .pipe(git.tag(v, message))
        .pipe(git.push('origin', 'master', '--tags'))
        .pipe(gulp.dest('./'));
});

gulp.task('npm', ['tag'], function (done) {
    require('child_process').spawn('npm', ['publish'], { stdio: 'inherit' })
        .on('close', done);
});

// Our default task.
// Builds our math game and runs our tests
gulp.task('default', ['test', 'build']);
gulp.task('ci', ['build']);
gulp.task('release', ['npm']);<commit_msg>IssueID#6: gulp task for tagging<commit_after>// Include gulp
var gulp = require('gulp'); 

// Include Our Plugins
var jshint = require('gulp-jshint');
var mochaPhantomJS = require('gulp-mocha-phantomjs');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var clean = require('gulp-clean');
var rename = require('gulp-rename');
var git = require('gulp-git');
var bump = require('gulp-bump');
var pkg = require('./package.json');

var paths = {
    scripts: ['js/*.js', 'test/**.*js', '!node_modules/**'],
    tests: 'test/**.*js'
};

gulp.task('clean', function () {
    return gulp.src('./dist', { read: false })
        .pipe(clean());
});

gulp.task('build', ['test', 'clean'], function () {
    return gulp.src('./js/*.js')
        .pipe(concat(pkg.name + '.js'))
        .pipe(gulp.dest('./dist'))
        .pipe(rename(pkg.name + '.min.js'))
        .pipe(uglify())
        .pipe(gulp.dest('./dist'));
});

// Lint Task
gulp.task('jshint', function() {
    return gulp.src(paths.scripts)
        .pipe(jshint())
        .pipe(jshint.reporter('default'))
        .pipe(jshint.reporter('fail'));
});

gulp.task('test', ['jshint'], function () {
    return gulp
        .src('tests/index.html')
        .pipe(mochaPhantomJS());
});

gulp.task('bump', ['build'], function () {
    return gulp.src(['./package.json', './bower.json'])
        .pipe(bump())
        .pipe(gulp.dest('./'));
});

gulp.task('tag', ['bump'], function () {
    var v = pkg.version;
    var message = 'Release ' + v;

    return gulp.src('./')
        .pipe(git.commit(message))
        .pipe(git.tag(v, message))
        .pipe(git.push('origin', 'master', '--tags'))
        .pipe(gulp.dest('./'));
});

gulp.task('npm', ['tag'], function (done) {
    require('child_process').spawn('npm', ['publish'], { stdio: 'inherit' })
        .on('close', done);
});

// Our default task.
// Builds our math game and runs our tests
gulp.task('default', ['test', 'build']);
gulp.task('ci', ['build']);
gulp.task('release', ['npm']);
{'fraction_non_alphanumeric': 0.24339810662680617, 'fraction_numerical': 0.00024912805181863477, 'mean_word_length': 3.1137295081967213, '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': '3159198', 'n_tokens_mistral': 1431, 'n_tokens_neox': 1402, 'n_words': 272}