Yauhen Hardzei

Results 5 comments of Yauhen Hardzei

How can I delete a folder .gulp/tinypng with gulp?

@pyrsmk thx, but how to do it after tinypng task? var rimraf = require('rimraf'); gulp.task('tinypng', function () { gulp.src(['app/img/**/*.png', '!app/img/compressed/**/*.png']) .pipe(tinypng('my api key')) .pipe(gulp.dest('app/img/compressed/')) .pipe(rimraf('.gulp')); }); It does not work.

If I do so: // Compress PNG Task gulp.task('compress', ['tinypng', 'del']); gulp.task('tinypng', function () { gulp.src(['app/img/**/*.png', '!app/img/compressed/**/*.png']) .pipe(tinypng('my api key')) .pipe(gulp.dest('app/img/compressed/')); }); gulp.task('del', ['tinypng'], function (cb) { rimraf('.gulp', cb); });...

@pyrsmk here is my repo https://github.com/Ferym26/GulpSass I did not understand how it should work =(

@pyrsmk helped to find a solution. there is var tinypng = require('gulp-tinypng'); var rimraf = require('rimraf'); // delete folder gulp.task('tinypng', function () { return gulp.src(['app/img/**/*.png', '!app/img/compressed/**/*.png']) .pipe(tinypng('lMaOo89RU3OngPRhsSAzAEjqqxPGe4rU')) .pipe(gulp.dest('app/img/compressed/')); }); gulp.task('compress',...