<commit_before>var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var rimraf = require('rimraf');

gulp.task('clean', function(done) {
  rimraf('build', done);
});

gulp.task('styles', function() {
  return gulp.src('src/styles/*.scss')
    .pipe($.sass())
    .pipe($.autoprefixer())
    .pipe(gulp.dest('build/styles'))
    .pipe($.csso())
    .pipe($.rename({suffix: '.min'}))
    .pipe(gulp.dest('build/styles'))
    .pipe($.connect.reload());
});

gulp.task('scripts', function() {
  return gulp.src(['src/scripts/init.js', 'src/scripts/modules/*.js'])
    .pipe($.jshint())
    .pipe($.concat('scripts.js'))
    .pipe(gulp.dest('build/scripts'))
    .pipe($.uglify())
    .pipe($.rename({suffix: '.min'}))
    .pipe(gulp.dest('build/scripts'))
    .pipe($.connect.reload());
});

gulp.task('html', function() {
  return gulp.src('src/**/[^_]*.jade')
    .pipe($.jade())
    .pipe(gulp.dest('build'))
    .pipe($.connect.reload());
});

gulp.task('images', function() {
  return gulp.src('src/images/**/*.{svg,png,jpg,gif}')
    .pipe(gulp.dest('build/images'))
    .pipe($.connect.reload());
});

gulp.task('serve', ['build'], function(done) {
  $.connect.server({
    root: 'build',
    livereload: true
  });
});

gulp.task('watch', ['build'], function() {
  gulp.watch('src/styles/**/*.scss', ['styles']);
  gulp.watch('src/scripts/**/*.js', ['scripts']);
  gulp.watch('src/**/*.jade', ['html']);
});

gulp.task('build', ['styles', 'scripts', 'html', 'images']);

gulp.task('default', ['serve', 'watch']);<commit_msg>added gulp-plumber<commit_after>var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var rimraf = require('rimraf');

var errorHandler = function(error) {
  $.util.log(error.toString());
  this.emit('end');
};

gulp.task('clean', function(done) {
  rimraf('build', done);
});

gulp.task('styles', function() {
  return gulp.src('src/styles/*.scss')
    .pipe($.plumber(errorHandler))
    .pipe($.sass())
    .pipe($.autoprefixer())
    .pipe(gulp.dest('build/styles'))
    .pipe($.csso())
    .pipe($.rename({suffix: '.min'}))
    .pipe(gulp.dest('build/styles'))
    .pipe($.connect.reload());
});

gulp.task('scripts', function() {
  return gulp.src(['src/scripts/init.js', 'src/scripts/modules/*.js'])
    .pipe($.plumber(errorHandler))
    .pipe($.jshint())
    .pipe($.concat('scripts.js'))
    .pipe(gulp.dest('build/scripts'))
    .pipe($.uglify())
    .pipe($.rename({suffix: '.min'}))
    .pipe(gulp.dest('build/scripts'))
    .pipe($.connect.reload());
});

gulp.task('html', function() {
  return gulp.src('src/**/[^_]*.jade')
    .pipe($.plumber(errorHandler))
    .pipe($.jade())
    .pipe(gulp.dest('build'))
    .pipe($.connect.reload());
});

gulp.task('images', function() {
  return gulp.src('src/images/**/*.{svg,png,jpg,gif}')
    .pipe($.plumber(errorHandler))
    .pipe(gulp.dest('build/images'))
    .pipe($.connect.reload());
});

gulp.task('serve', ['build'], function(done) {
  $.connect.server({
    root: 'build',
    livereload: true
  });
});

gulp.task('watch', ['build'], function() {
  gulp.watch('src/styles/**/*.scss', ['styles']);
  gulp.watch('src/scripts/**/*.js', ['scripts']);
  gulp.watch('src/**/*.jade', ['html']);
});

gulp.task('build', ['styles', 'scripts', 'html', 'images']);

gulp.task('default', ['serve', 'watch']);
{'fraction_non_alphanumeric': 0.2821901323706378, 'fraction_numerical': 0.0, 'mean_word_length': 4.0685975609756095, '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': '6218099', 'n_tokens_mistral': 1244, 'n_tokens_neox': 1241, 'n_words': 159}