<commit_before>var gulp     = require('gulp');
var changed = require('gulp-changed');
var imagemin = require('gulp-imagemin');
var pngquant = require('imagemin-pngquant');
var _        = require('underscore');
var elixir   = require('laravel-elixir');
var config   = elixir.config;

/*
 |----------------------------------------------------------------
 | ImageMin Processor
 |----------------------------------------------------------------
 |
 | This task will trigger your images to be processed using
 | imagemin processor.
 |
 | Minify PNG, JPEG, GIF and SVG images
 |
 */
elixir.extend('imagemin', function(src, output, options) {

    config.images = {
        folder: 'images',
        outputFolder: 'images',

        pluginOptions: {
            progressive: true,
            svgoPlugins: [{removeViewBox: false}],
            use: [pngquant()]
        }
    };

    options = _.extend(config.images.pluginOptions, options);

    new elixir.Task('imagemin', function () {
        var paths = new elixir.GulpPaths()
            .src(src, src || config.get('assets.images.folder'))
            .output(output || config.get('public.images.outputFolder'));

        return gulp.src(paths.src.path)
            .pipe(changed(paths.output.path))
            .pipe(imagemin(options))
            .on('error', function(e) {
                new elixir.Notification().error(e, 'ImageMin Failed!');
                this.emit('end');
            })
            .pipe(gulp.dest(paths.output.path))
            .pipe(new elixir.Notification('ImageMin Complete!'))
    }).watch(
        [
            config.get('assets.images.folder') + '/**/*.jpg',
            config.get('assets.images.folder') + '/**/*.jpeg',
            config.get('assets.images.folder') + '/**/*.svg',
            config.get('assets.images.folder') + '/**/*.gif',<commit_msg>fixing bug<commit_after>var gulp     = require('gulp');
var changed = require('gulp-changed');
var imagemin = require('gulp-imagemin');
var pngquant = require('imagemin-pngquant');
var _        = require('underscore');
var elixir   = require('laravel-elixir');
var config   = elixir.config;

/*
 |----------------------------------------------------------------
 | ImageMin Processor
 |----------------------------------------------------------------
 |
 | This task will trigger your images to be processed using
 | imagemin processor.
 |
 | Minify PNG, JPEG, GIF and SVG images
 |
 */
elixir.extend('imagemin', function(src, output, options) {

    config.images = {
        folder: 'images',
        outputFolder: 'images',

        pluginOptions: {
            progressive: true,
            svgoPlugins: [{removeViewBox: false}],
            use: [pngquant()]
        }
    };

    options = _.extend(config.images.pluginOptions, options);

    new elixir.Task('imagemin', function () {
        var paths = new elixir.GulpPaths()
            .src(src || config.get('assets.images.folder'))
            .output(output || config.get('public.images.outputFolder'));

        return gulp.src(paths.src.path)
            .pipe(changed(paths.output.path))
            .pipe(imagemin(options))
            .on('error', function(e) {
                new elixir.Notification().error(e, 'ImageMin Failed!');
                this.emit('end');
            })
            .pipe(gulp.dest(paths.output.path))
            .pipe(new elixir.Notification('ImageMin Complete!'))
    }).watch(
        [
            config.get('assets.images.folder') + '/**/*.jpg',
            config.get('assets.images.folder') + '/**/*.jpeg',
            config.get('assets.images.folder') + '/**/*.svg',
            config.get('assets.images.folder') + '/**/*.gif',
{'fraction_non_alphanumeric': 0.2224334600760456, 'fraction_numerical': 0.0, 'mean_word_length': 1.848414539829853, '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': '1900029', 'n_tokens_mistral': 1055, 'n_tokens_neox': 1020, 'n_words': 193}