Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. const gulp = require('gulp');
  2. const tinypng = require('gulp-tinypng-compress');
  3. gulp.task('tinypng', function (done) {
  4. return gulp.src('./public/img/**/*.{png,jpg,jpeg}')
  5. .pipe(tinypng({
  6. key: 'MnSxThojIQVJ3r59bURj0F6wYKMwfPp7'
  7. }))
  8. .pipe(gulp.dest('./public/tiny'));
  9. done();
  10. });
  11. gulp.task('movesvg', function() {
  12. return gulp.src('./public/img/**/*.svg')
  13. .pipe(gulp.dest('./public/tiny'));
  14. });
  15. gulp.task('default', gulp.series('movesvg', 'tinypng'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement