mcfly-io / generator-mcfly

A Yeoman generator for scaffolding an application using angular, browserify, ionic and famous
323 stars 43 forks source link

Add target support for taskImage #274

Open ghaiat opened 9 years ago

ghaiat commented 9 years ago

in dist.js


var taskImage = function(constants) {
    var dest = constants.dist.distFolder;
    dest = helper.isMobile(constants) ? dest + '/www' : dest;

    var commonImages = constants.images.src;
    var targetImages = constants.images['src_' + constants.targetName];

    var images = _.uniq(_.union(commonImages, targetImages));

    gulp.src(images, {
            base: constants.clientFolder
        })
        .pipe(imagemin())
        .pipe(gulp.dest(dest));
};