<commit_before>
del        = require 'del'
gulp       = require 'gulp'
coffee     = require 'gulp-coffee'
jade       = require 'gulp-jade'
minifyCSS  = require 'gulp-minify-css'
minifyHTML = require 'gulp-minify-html'
ngAnnotate = require 'gulp-ng-annotate'
rename     = require 'gulp-rename'
sass       = require 'gulp-sass'
sourcemaps = require 'gulp-sourcemaps'
uglify     = require 'gulp-uglify'
gutil      = require 'gulp-util'

paths = {
  srcSass:   ['src/main/sass/**/*.sass', 'src/main/sass/**/*.scss']
  destCSS:   'www/css'

  srcCoffee: 'src/main/coffee/**/*.coffee'
  destJS:    'www/js'

  srcJade:   'src/main/jade/**/*.jade'
  destHTML:  'www'
}

gulp.task 'default', ['sass', 'coffee', 'jade']

gulp.task 'sass', (done) ->
  gulp.src paths.srcSass
    .pipe sass({errLogToConsole: true, indentedSyntax: true})
      .on 'error', gutil.log
    .pipe gulp.dest paths.destCSS
    .pipe minifyCSS keepSpecialComments: 0
    .pipe rename( (path) -> path.extName = '.min.css' )
    .pipe gulp.dest paths.destCSS
    .on 'end', done
  return undefined

gulp.task 'coffee', (done) ->
  gulp.src paths.srcCoffee
    .pipe sourcemaps.init()
    .pipe coffee({bare: true})
      .on 'error', gutil.log
    .pipe gulp.dest paths.destJS
    .pipe ngAnnotate()
    .pipe uglify()
    .pipe rename( (path) -> path.extname = '.min.js' )
    .pipe sourcemaps.write()
    .pipe gulp.dest paths.destJS
    .on 'end', done
  return undefined

gulp.task 'jade', (done) ->
  gulp.src paths.srcJade
    .pipe jade()
      .on 'error', gutil.log
    .pipe minifyHTML()
    .pipe gulp.dest paths.destHTML
    .on 'end', done
  return undefined

gulp.task 'watch', ->
  gulp.watch paths.srcSass, ['sass']
  gulp.watch paths.srcCoffee, ['coffee']
  gulp.watch paths.srcJade, ['jade']

# Clean up all compile output
gulp.task 'clean', ->
  del [
    paths.destCSS,
    paths.destJS,
    paths.destHTML + '/templates',
    paths.destHTML + '/index.html'
  ]

# Clean up bower libraries
gulp.task 'clean-all', ['clean'], ->
  del [
    'src/main/webapp/lib'
  ]<commit_msg>Now gulp clean-all properly deletes stuff<commit_after>
del        = require 'del'
gulp       = require 'gulp'
coffee     = require 'gulp-coffee'
jade       = require 'gulp-jade'
minifyCSS  = require 'gulp-minify-css'
minifyHTML = require 'gulp-minify-html'
ngAnnotate = require 'gulp-ng-annotate'
rename     = require 'gulp-rename'
sass       = require 'gulp-sass'
sourcemaps = require 'gulp-sourcemaps'
uglify     = require 'gulp-uglify'
gutil      = require 'gulp-util'

paths = {
  srcSass:   ['src/main/sass/**/*.sass', 'src/main/sass/**/*.scss']
  destCSS:   'www/css'

  srcCoffee: 'src/main/coffee/**/*.coffee'
  destJS:    'www/js'

  srcJade:   'src/main/jade/**/*.jade'
  destHTML:  'www'
}

gulp.task 'default', ['sass', 'coffee', 'jade']

gulp.task 'sass', (done) ->
  gulp.src paths.srcSass
    .pipe sass({errLogToConsole: true, indentedSyntax: true})
      .on 'error', gutil.log
    .pipe gulp.dest paths.destCSS
    .pipe minifyCSS keepSpecialComments: 0
    .pipe rename( (path) -> path.extName = '.min.css' )
    .pipe gulp.dest paths.destCSS
    .on 'end', done
  return undefined

gulp.task 'coffee', (done) ->
  gulp.src paths.srcCoffee
    .pipe sourcemaps.init()
    .pipe coffee({bare: true})
      .on 'error', gutil.log
    .pipe gulp.dest paths.destJS
    .pipe ngAnnotate()
    .pipe uglify()
    .pipe rename( (path) -> path.extname = '.min.js' )
    .pipe sourcemaps.write()
    .pipe gulp.dest paths.destJS
    .on 'end', done
  return undefined

gulp.task 'jade', (done) ->
  gulp.src paths.srcJade
    .pipe jade()
      .on 'error', gutil.log
    .pipe minifyHTML()
    .pipe gulp.dest paths.destHTML
    .on 'end', done
  return undefined

gulp.task 'watch', ->
  gulp.watch paths.srcSass, ['sass']
  gulp.watch paths.srcCoffee, ['coffee']
  gulp.watch paths.srcJade, ['jade']

# Clean up all compile output
gulp.task 'clean', ->
  del [
    paths.destCSS,
    paths.destJS,
    paths.destHTML + '/templates',
    paths.destHTML + '/index.html'
  ]

# Clean up bower libraries
gulp.task 'clean-all', ['clean'], ->
  del [
    'www/lib'
  ]
{'fraction_non_alphanumeric': 0.16029980657640233, 'fraction_numerical': 0.00048355899419729207, 'mean_word_length': 2.7919340054995416, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 7, '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': '1529686', 'n_tokens_mistral': 1619, 'n_tokens_neox': 1587, 'n_words': 361}