function copy() {
  const pkgsAll = require('../app/data/packages').all;
  const pkgsFiltered = pkgsAll.filter((rsx) => !rsx.cdn);
  gutil.log(gutil.colors.magenta(`${pkgsFiltered.length} non-cdn resources detected`));
  let paths = pkgsFiltered.reduce((paths, rsx) => {
    if (rsx.img) {
      paths.push(`app/${rsx.img}`);
    }
    if (rsx.imgPosX) { paths.push(`app/${rsx.imgPosX}`); }
    if (rsx.imgNegX) { paths.push(`app/${rsx.imgNegX}`); }
    if (rsx.imgPosY) { paths.push(`app/${rsx.imgPosY}`); }
    if (rsx.imgNegY) { paths.push(`app/${rsx.imgNegY}`); }
    if (rsx.imgPosZ) { paths.push(`app/${rsx.imgPosZ}`); }
    if (rsx.imgNegZ) { paths.push(`app/${rsx.imgNegZ}`); }
    if (rsx.audio) {
      paths.push(`app/${rsx.audio}`);
    }
    if (rsx.plist) {
      paths.push(`app/${rsx.plist}`);
    }
    if (rsx.font) {
      paths.push(`app/${rsx.font}`);
    }
    return paths;
  }, []);
  paths = _.uniq(paths);
  // paths.forEach(path => gutil.log(gutil.colors.bgMagenta.white(path)))
  gutil.log(gutil.colors.magenta(`${paths.length} paths being copied for packaging`));
  return gulp.src(paths, { base: 'app' })
    .pipe(gulp.dest('dist/src'));
}
/*.{jpg,png}')
    .pipe(changed('app/resources', { hasChanged: changed.compareSha1Digest }))
    .pipe(imagemin([mozjpeg(), zopfli()], { verbose: true }))
    .pipe(size())
    .pipe(gulp.dest('app/resources'));
}

export function imageMinLossy() {
  return gulp.src(['app/resources/*