{"size": 574, "ext": "js", "max_stars_repo_path": "build_scripts/helpers/imagemin_helper.js", "max_stars_repo_name": "djforth/walkabout-jobs-search", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "build_scripts/helpers/imagemin_helper.js", "max_issues_repo_name": "djforth/walkabout-jobs-search", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "build_scripts/helpers/imagemin_helper.js", "max_forks_repo_name": "djforth/walkabout-jobs-search", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.9565217391, "max_line_length": 53, "alphanum_fraction": 0.5836236934}
const Imagemin = require('imagemin')
    , folder   = require('./folder_helpers')
    , _        = require('lodash');

module.exports = function(path, dest, cb){
  folder.folder(path);

  new Imagemin()
    .src(`${path}/**/*.{gif,jpg,png,svg}`)
    .dest(dest)
    .use(Imagemin.jpegtran({progressive: true}))
    .use(Imagemin.gifsicle({interlaced: true}))
    .use(Imagemin.optipng({optimizationLevel: 3}))
    .run(function (err, files) {
      if(err)
        console.error(err)
      else
        cb();

      console.log("Minified", _.pluck(files, "path"))

    });
}