<commit_before>// Load Gulp plugin
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var autoprefixer = require('gulp-autoprefixer');
var eslint = require('gulp-eslint');
var csscomb = require('gulp-csscomb');
var sass = require('gulp-sass');
var uglify = require('gulp-uglify');
var minifyCss = require('gulp-minify-css');
var babel = require("gulp-babel");
var eslint = require('eslint/lib/cli');
var globby = require('globby');
//Static Server
gulp.task('serve', function() {
    browserSync.init({
        server: {
            baseDir: "./"
        }
    });
    //Watch HTML File Change
    gulp.watch("*.html").on("change", browserSync.reload);
});

//Sass(Scss) Task (Development Only)
gulp.task('compile:Sass', function () {
  gulp.src('./src/sass/**/*.scss')
    .pipe(sass.sync().on('error', sass.logError))
    .pipe(autoprefixer({
            browsers: ['> 1%', 'last 2 versions', 'Firefox ESR', 'Opera 12.1'],
            cascade: false
        }))
        .pipe(csscomb())
        .pipe(gulp.dest('./src/css'))
        .pipe(browserSync.stream());
});

//Minify CSS Task (Production Only)
gulp.task('minify:css',function(){
	 gulp.src('./src/css/*.css')
	 .pipe(minifyCss())
	 .pipe(gulp.dest('./build/css/'))
   .pipe(browserSync.stream());
	});

// Babel Task (Production)
gulp.task('babel:js',function () {
	gulp.src('./src/js/**/*.js')
	.pipe(babel())
  .pipe(gulp.dest("./build/js"))
  .pipe(browserSync.stream());
});

// create a task that ensures the `js` task is complete before
// reloading browsers
gulp.task('js-watch', ['babel:js'], browserSync.reload);


//lint and minify JS Task (Development)
gulp.task('eslint',function(){
		return gulp.src(['./src/js/**/*.js'])
		.pipe(eslint())
		.pipe(eslint.format())
		.pipe(eslint.failOnError())
		.pipe(uglify())
		.pipe(gulp.dest('./build/js/*.js'));
	});

  // patterns with the same form as gulp.src(patterns)
  var patterns = ['lib/**/*.{js}'];

  globby(patterns, function(err, paths) {
    if (err) {
      // unexpected failure, include stack
      done(err);
      return;<commit_msg>cleanup<commit_after>// Load Gulp plugin
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var autoprefixer = require('gulp-autoprefixer');
var csscomb = require('gulp-csscomb');
var sass = require('gulp-sass');
var uglify = require('gulp-uglify');
var minifyCss = require('gulp-minify-css');
var babel = require("gulp-babel");
var eslint = require('eslint/lib/cli');
var globby = require('globby');
//Static Server
gulp.task('serve', function() {
    browserSync.init({
        server: {
            baseDir: "./"
        }
    });
    //Watch HTML File Change
    gulp.watch("*.html").on("change", browserSync.reload);
});

//Sass(Scss) Task (Development Only)
gulp.task('sass', function () {
  gulp.src('./src/sass/**/*.scss')
    .pipe(sass.sync().on('error', sass.logError))
    .pipe(autoprefixer({
            browsers: ['> 1%', 'last 2 versions', 'Firefox ESR'],
            cascade: false
        }))
        .pipe(csscomb())
        .pipe(gulp.dest('./src/css'))
        .pipe(browserSync.stream());
});

//Minify CSS Task (Production Only)
gulp.task('minify:css',function(){
	 gulp.src('./src/css/*.css')
	 .pipe(minifyCss())
	 .pipe(gulp.dest('./build/css/'))
   .pipe(browserSync.stream());
	});

// Babel Task (Production)
gulp.task('babel:js',function () {
	gulp.src('./src/js/**/*.js')
	.pipe(babel())
  .pipe(gulp.dest("./build/js"))
  .pipe(browserSync.stream());
});

// create a task that ensures the `js` task is complete before
// reloading browsers
gulp.task('js-watch', ['babel:js'], browserSync.reload);


//Custom eslint without gulp-eslint from
//http://bl.ocks.org/tschaub/b7fed443597b979ceb28
//Running ESLint with Gulp

// run eslint without an additional plugin
gulp.task('lint', function(done) {

  // patterns with the same form as gulp.src(patterns)
  var patterns = ['lib/**/*.{js}'];

  globby(patterns, function(err, paths) {
    if (err) {
      // unexpected failure, include stack
      done(err);
      return;
{'fraction_non_alphanumeric': 0.20755642787046125, 'fraction_numerical': 0.004661432777232581, 'mean_word_length': 3.3791621911922665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3651142', 'n_tokens_mistral': 1465, 'n_tokens_neox': 1413, 'n_words': 284}