<commit_before>var gulp = require('gulp');
var uglify = require('gulp-uglify');
var del = require('del');
var minifyCSS = require('gulp-minify-css');
var rename = require('gulp-rename');
var plumber = require('gulp-plumber');
var browserify = require('browserify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var gutil = require('gulp-util');

// Compiles .jsx files to .js and copies directly into the build directory
gulp.task('compile-jsx', function () {
    // set up the browserify instance on a task basis
    var b = browserify({
      entries: ['./src/main.js'],
      debug: true,
      // defining transforms here will avoid crashing your stream
      transform: [babelify]
    });

    return b.bundle()
        .pipe(source('./script.js'))
        .on('error', gutil.log)
        .pipe(gulp.dest('./build/js/'));
});

gulp.task('lint', ['compile-jsx'], function () {

});

gulp.task('build-js', ['lint'], function () {
    return gulp.src('build/js/*.js')
        .pipe(plumber())
        .pipe(uglify())
        .pipe(rename({extname: '.min.js'}))
        .pipe(gulp.dest('build/js'));
});

// Minify css
gulp.task('build-css', function () {
    return gulp.src('./public/css/*.css')
        .pipe(gulp.dest('./build/css'))
        .pipe(minifyCSS())
        .pipe(rename({extname: ".min.css"}))
        .pipe(gulp.dest('./build/css'));
});

// build html
gulp.task('build-html', function() {
    return gulp.src('./public/index.html')
        .pipe(gulp.dest('./build/'));
});

// copy built js and dependencies to /dist
gulp.task('dist-js', ['build-js'], function () {
    return gulp.src('build/js/*.min.js')
        .pipe(gulp.dest('./dist/js'));
});

// Copies built CSS and dependencies to /dist
gulp.task('dist-css', ['build-css'], function () {
    return gulp.src('./build/css/*.min.css')
        .pipe(gulp.dest('./dist/css'));
});

// copy html to /dist
gulp.task('dist-html', ['build-html'], function () {
    return gulp.src('./public/index.html')<commit_msg>Use gulp-clean-css instead of gulp-minify-css<commit_after>var gulp = require('gulp');
var uglify = require('gulp-uglify');
var del = require('del');
var cleanCSS = require('gulp-clean-css');
var rename = require('gulp-rename');
var plumber = require('gulp-plumber');
var browserify = require('browserify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var gutil = require('gulp-util');

// Compiles .jsx files to .js and copies directly into the build directory
gulp.task('compile-jsx', function () {
    // set up the browserify instance on a task basis
    var b = browserify({
      entries: ['./src/main.js'],
      debug: true,
      // defining transforms here will avoid crashing your stream
      transform: [babelify]
    });

    return b.bundle()
        .pipe(source('./script.js'))
        .on('error', gutil.log)
        .pipe(gulp.dest('./build/js/'));
});

gulp.task('lint', ['compile-jsx'], function () {

});

gulp.task('build-js', ['lint'], function () {
    return gulp.src('build/js/*.js')
        .pipe(plumber())
        .pipe(uglify())
        .pipe(rename({extname: '.min.js'}))
        .pipe(gulp.dest('build/js'));
});

// Minify css
gulp.task('build-css', function () {
    return gulp.src('./public/css/*.css')
        .pipe(gulp.dest('./build/css'))
        .pipe(cleanCSS())
        .pipe(rename({extname: ".min.css"}))
        .pipe(gulp.dest('./build/css'));
});

// build html
gulp.task('build-html', function() {
    return gulp.src('./public/index.html')
        .pipe(gulp.dest('./build/'));
});

// copy built js and dependencies to /dist
gulp.task('dist-js', ['build-js'], function () {
    return gulp.src('build/js/*.min.js')
        .pipe(gulp.dest('./dist/js'));
});

// Copies built CSS and dependencies to /dist
gulp.task('dist-css', ['build-css'], function () {
    return gulp.src('./build/css/*.min.css')
        .pipe(gulp.dest('./dist/css'));
});

// copy html to /dist
gulp.task('dist-html', ['build-html'], function () {
    return gulp.src('./public/index.html')
{'fraction_non_alphanumeric': 0.2139243555769694, 'fraction_numerical': 0.0, 'mean_word_length': 3.050731707317073, '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': '5949786', 'n_tokens_mistral': 1387, 'n_tokens_neox': 1378, 'n_words': 293}