<commit_before>del = require 'del'
gulp = require 'gulp'
gutil = require 'gulp-util'
coffee = require 'gulp-coffee'
sourcemaps = require 'gulp-sourcemaps'
istanbul = require 'gulp-coffee-istanbul'
coffeelint = require 'gulp-coffeelint'
mocha = require 'gulp-mocha'

jsFiles     = ['lib/**/*.js']
specFiles   = ['spec/**/*.coffee']
coffeeFiles = ['src/**/*.coffee']
testFiles   = jsFiles
buildFiles  = ['lib', 'coverage']

gulp.task 'clean', (cb) ->
  del buildFiles, cb

gulp.task 'lint', ->
  gulp.src coffeeFiles
    .pipe coffeelint()
    .pipe coffeelint.reporter()
    .pipe coffeelint.reporter('fail') # fail task

gulp.task 'coffee', ['lint'], ->
  gulp.src coffeeFiles
    .pipe sourcemaps.init()
    .pipe coffee({bare: true}).on('error', gutil.log)
    .pipe sourcemaps.write()
    .pipe gulp.dest './lib/'

gulp.task 'build', ['coffee']

gulp.task 'test', ['coffee'], ->
  gulp.src testFiles
    .pipe istanbul( includeUntested: true ) # Covering files
    .pipe istanbul.hookRequire()
    .on 'finish', ->
      gulp.src specFiles
        .pipe mocha reporter: 'nyan'
        .pipe istanbul.writeReports() # Creating the reports after tests run

gulp.task 'default', ['test']<commit_msg>clean by default when running gulp<commit_after>del = require 'del'
gulp = require 'gulp'
gutil = require 'gulp-util'
coffee = require 'gulp-coffee'
sourcemaps = require 'gulp-sourcemaps'
istanbul = require 'gulp-coffee-istanbul'
coffeelint = require 'gulp-coffeelint'
mocha = require 'gulp-mocha'

jsFiles     = ['lib/**/*.js']
specFiles   = ['spec/**/*.coffee']
coffeeFiles = ['src/**/*.coffee']
testFiles   = jsFiles
buildFiles  = ['lib', 'coverage']

gulp.task 'clean', ->
  del.sync buildFiles

gulp.task 'lint', ->
  gulp.src coffeeFiles
    .pipe coffeelint()
    .pipe coffeelint.reporter()
    .pipe coffeelint.reporter('fail') # fail task

gulp.task 'coffee', ['lint'], ->
  gulp.src coffeeFiles
    .pipe sourcemaps.init()
    .pipe coffee({bare: true}).on('error', gutil.log)
    .pipe sourcemaps.write()
    .pipe gulp.dest './lib/'

gulp.task 'build', ['coffee']

gulp.task 'test', ['coffee'], ->
  gulp.src testFiles
    .pipe istanbul( includeUntested: true ) # Covering files
    .pipe istanbul.hookRequire()
    .on 'finish', ->
      gulp.src specFiles
        .pipe mocha reporter: 'nyan'
        .pipe istanbul.writeReports() # Creating the reports after tests run

gulp.task 'default', ['clean', 'test']
{'fraction_non_alphanumeric': 0.1646039603960396, 'fraction_numerical': 0.0, 'mean_word_length': 3.507434944237918, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '2044690', 'n_tokens_mistral': 895, 'n_tokens_neox': 856, 'n_words': 211}