<commit_before>
var gulp = require('gulp');

// package.json
var pkg = require('./package.json');

// plugins
var notify      = require("gulp-notify"),
    gutil       = require('gulp-util'),
    plumber     = require('gulp-plumber'),
    less        = require('gulp-less'),
    recess      = require('gulp-recess'),
    prefix      = require('gulp-autoprefixer'),
    soften      = require('gulp-soften'),
    cssbeautify = require('gulp-cssbeautify'),
    minifyCSS   = require('gulp-minify-css'),
    csscomb     = require('gulp-csscomb'),
    imagemin    = require('gulp-imagemin'),
    pngcrush    = require('imagemin-pngcrush');

// Dir Variables
var assetsDir = 'assets/',
    lessDir   = assetsDir + 'less/',
    cssDir    = assetsDir + 'css/',
    cssminDir = './' + cssDir +'min/',
    imgDir    = assetsDir + 'imgs/',
    anyDir    = '**/';
var files   = [
                'style.less',
                'core.less',
                'theme.less'
              ]


// Command line option:
var onError = function (err) {
    gutil.log(gutil.colors.red(err));
};

// Tasks

gulp.task('style', function () {
    return gulp.src(lessDir + 'style.less')
        .pipe(plumber({
            errorHandler: onError
        }))
        // Convert Less
        .pipe(less())
        .pipe(gulp.dest(cssDir)).pipe(notify("style.less Rendered!"));
});

gulp.task('core', function () {
    return gulp.src(lessDir + 'core.less')
        .pipe(plumber({
            errorHandler: onError
        }))
        // Convert Less
        .pipe(less())
        .pipe(gulp.dest(cssDir)).pipe(notify("core.less Rendered!"));
});

gulp.task('theme', function () {
    return gulp.src(lessDir + 'theme.less')
        .pipe(plumber({
            errorHandler: onError
        }))
        // Convert Less
        .pipe(less())
        .pipe(gulp.dest(cssDir)).pipe(notify("theme.less Rendered!"));
});

gulp.task('prefix', function () {
    return gulp.src(cssDir + '*.css')
        .pipe(plumber({
            errorHandler: onError
        }))
        .pipe(prefix("last 15 version", "> 1%", "Explorer 8", { cascade: true }))
        .pipe(gulp.dest(cssDir)).pipe(notify("CSS Prefixed!"));
});

gulp.task('sort', function () {
    return gulp.src(cssDir + '*.css')
        .pipe(plumber({
            errorHandler: onError
        }))
        .pipe(csscomb())
        .pipe(gulp.dest(cssDir)).pipe(notify("CSS Sorted!"));
});

gulp.task('space', function () {
    return gulp.src(cssDir + '*.css')
        .pipe(plumber({
            errorHandler: onError
        }))
        .pipe(cssbeautify({
            indent: '  ',
            autosemicolon: true
        }))
        .pipe(gulp.dest(cssDir)).pipe(notify("CSS Spaced!"));
});

gulp.task('lint', function () {
    return gulp.src(cssDir + '*.css')
        .pipe(plumber({
            errorHandler: onError
        }))
        .pipe(recess({
            strictPropertyOrder: false
        }))
        .pipe(gulp.dest(cssDir)).pipe(notify("CSS Analyzed!"));
});

gulp.task('minify', function () {
    return gulp.src(cssDir + '*.css')
        .pipe(plumber({
            errorHandler: onError
        }))
        .pipe(minifyCSS({
            keepBreaks: false,
            processImport: true,
            noAdvanced: false
        }))
        .pipe(gulp.dest(cssminDir)).pipe(notify("CSS Minified!"));
});

gulp.task('crush', function () {
    // { image optimizer }
    return gulp.src(imgDir + '*.png')
        .pipe(plumber({
            errorHandler: onError
        }))
        .pipe(imagemin({
            progressive: true,
            svgoPlugins: [{removeViewBox: false}],
            use: [pngcrush()]
        }))
        .pipe(gulp.dest(imgDir)).pipe(notify("Images Crushed!"));
});

gulp.task('watch', function() {
    gulp.watch(lessDir + '**/*.*', ['style', 'core', 'theme']);
    gulp.watch(cssDir + 'style.css', ['space', 'sort', 'minify']);
    gulp.watch(cssDir + 'core.css', ['space', 'sort', 'minify']);
    gulp.watch(cssDir + 'theme.css', ['space', 'sort', 'minify']);
    gulp.watch(imgDir + '*.*', ['crush', 'space', 'sort', 'minify']);
});

gulp.task('default', ['style', 'core', 'theme', 'crush', 'watch']);<commit_msg>condense all functionality into single build process<commit_after>
var gulp = require('gulp');

// package.json
var pkg = require('./package.json');

// plugins
var notify      = require("gulp-notify"),
    gutil       = require('gulp-util'),
    plumber     = require('gulp-plumber'),
    less        = require('gulp-less'),
    recess      = require('gulp-recess'),
    prefix      = require('gulp-autoprefixer'),
    soften      = require('gulp-soften'),
    cssbeautify = require('gulp-cssbeautify'),
    minifyCSS   = require('gulp-minify-css'),
    csscomb     = require('gulp-csscomb'),
    imagemin    = require('gulp-imagemin'),
    pngcrush    = require('imagemin-pngcrush');

// Dir Variables
var assetsDir = 'assets/',
    lessDir   = assetsDir + 'less/',
    cssDir    = assetsDir + 'css/',
    cssminDir = './' + cssDir +'min/',
    imgDir    = assetsDir + 'imgs/',
    anyDir    = '**/';

var files   = [
                'style.less',
                'core.less',
                'theme.less'
              ]

// Command line option:
var onError = function (err) {
    gutil.log(gutil.colors.red(err));
};

// Tasks

gulp.task('build', function () {
    for (var i = 0; i < files.length; i++) {
        return gulp.src(lessDir + files[i])
        .pipe(plumber({
            errorHandler: onError
        }))
        // Convert Less
        .pipe(less()).pipe(notify(files[i] + " Rendered!"))
        .pipe(csscomb()).pipe(notify(files[i] + " Sorted!"))
        .pipe(cssbeautify({
            indent: '  ',
            autosemicolon: true
        })).pipe(notify(files[i] + " Spaced!"))
        .pipe(gulp.dest(cssDir))
        .pipe(minifyCSS({
            keepBreaks: false,
            processImport: true,
            noAdvanced: false
        }))
        .pipe(gulp.dest(cssminDir)).pipe(notify(files[i] + " Minified!"));
    }
});

gulp.task('crush', function () {
    // { image optimizer }
    return gulp.src(imgDir + '*.png')
        .pipe(plumber({
            errorHandler: onError
        }))
        .pipe(imagemin({
            progressive: true,
            svgoPlugins: [{removeViewBox: false}],
            use: [pngcrush()]
        }))
        .pipe(gulp.dest(imgDir)).pipe(notify("Images Crushed!"));
});

gulp.task('watch', function() {
    gulp.watch(lessDir + '**/*.*', ['build']);
    gulp.watch(imgDir + '*.*', ['crush']);
});

gulp.task('default', ['crush', 'build', 'watch']);
{'fraction_non_alphanumeric': 0.18842774916691912, 'fraction_numerical': 0.000757346258709482, 'mean_word_length': 2.1852387843704775, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '1616387', 'n_tokens_mistral': 2202, 'n_tokens_neox': 2154, 'n_words': 368}