<commit_before>'use strict';

var gulp = require('gulp');
var stylish = require('jshint-stylish');
var istanbul = require('gulp-istanbul');
var jshint = require('gulp-jshint');
var mocha = require('gulp-mocha');
var git = require('gulp-git');
var del = require('rimraf');

var lint = ['index.js', 'lib/*.js'];

function url(repo) {
  return 'https://github.com/' + repo;
}

gulp.task('coverage', function () {
  return gulp.src(lint)
    .pipe(istanbul())
    .pipe(istanbul.hookRequire());
});

gulp.task('test', ['clone', 'coverage'], function () {
  return gulp.src('test/*.js')
    .pipe(mocha({reporter: 'spec'}))
    .pipe(istanbul.writeReports())
    .pipe(istanbul.writeReports({
      reporters: [ 'text' ],
      reportOpts: {dir: 'coverage', file: 'summary.txt'}
    }));
});

gulp.task('lint', function () {
  return gulp.src(lint.concat('test/*.js'))
    .pipe(jshint())
    .pipe(jshint.reporter(stylish));
});

gulp.task('spec', ['clone'], function (cb) {
  gulp.src('test/_spec/test/*.js')
    .pipe(mocha({reporter: 'spec'}))
    .on('end', function () {
      del('test/_spec', cb);
    });
});

gulp.task('clone', function(cb) {
  del('test/_spec', function (err) {
    if (err) return cb(err);
    git.clone(url('jonschlinkert/templates'), {
      args: 'test/_spec'
    }, cb);
  });
});

gulp.task('default', ['test', 'spec', 'lint']);
<commit_msg>adds del task<commit_after>'use strict';

var gulp = require('gulp');
var minimist = require('minimist');
var stylish = require('jshint-stylish');
var istanbul = require('gulp-istanbul');
var jshint = require('gulp-jshint');
var mocha = require('gulp-mocha');
var git = require('gulp-git');
var del = require('rimraf');

var argv = minimist(process.argv.slice(2), {
  alias: {d: 'del'}
});

var lint = ['index.js', 'lib/*.js'];

function url(repo) {
  return 'https://github.com/' + repo;
}

gulp.task('coverage', function () {
  return gulp.src(lint)
    .pipe(istanbul())
    .pipe(istanbul.hookRequire());
});

gulp.task('test', ['clone', 'coverage'], function () {
  return gulp.src('test/*.js')
    .pipe(mocha({reporter: 'spec'}))
    .pipe(istanbul.writeReports())
    .pipe(istanbul.writeReports({
      reporters: [ 'text' ],
      reportOpts: {dir: 'coverage', file: 'summary.txt'}
    }));
});

gulp.task('lint', function () {
  return gulp.src(lint.concat('test/*.js'))
    .pipe(jshint())
    .pipe(jshint.reporter(stylish));
});

gulp.task('spec', ['clone'], function (cb) {
  gulp.src('test/_spec/test/*.js')
    .pipe(mocha({reporter: 'spec'}))
    .on('end', function () {
      del('test/_spec', cb);
    });
});

gulp.task('clone', function(cb) {
  del('test/_spec', function (err) {
    if (err) return cb(err);
    git.clone(url('jonschlinkert/templates'), {
      args: 'test/_spec'
    }, cb);
  });
});

gulp.task('del', function(cb) {
  del(argv.d || 'test/_spec', cb);
});

gulp.task('default', ['test', 'spec', 'lint']);

{'fraction_non_alphanumeric': 0.23646333104866346, 'fraction_numerical': 0.0003427004797806717, 'mean_word_length': 3.9727427597955707, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3890359', 'n_tokens_mistral': 1095, 'n_tokens_neox': 1096, 'n_words': 194}