daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Dec 14th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. gulp.task('build', gulp.parallel('clean', 'sass', 'js'), function () {
  2.  
  3.     var cssDist = gulp.src([
  4.         'app/css/style.min.css',
  5.     ]).pipe(gulp.dest('dist/css'));
  6.     var fontsDist = gulp.src('app/fonts/**/*').pipe(gulp.dest('dist/fonts'));
  7.     var jsDist = gulp.src(['app/js/**/*', '!app/js/common.js']).pipe(gulp.dest('dist/js'));
  8.     var htmlDist = gulp.src(['app/*.html', '!app/template.html']).pipe(gulp.dest('dist'));
  9.     var imgDist = gulp.src('app/img/**/*')
  10.         .pipe(cache(imagemin({
  11.             interlaced: true,
  12.             progressive: true,
  13.             svgoPlugins: [{
  14.                 removeViewBox: false
  15.             }],
  16.             use: [pngquant()]
  17.         })))
  18.         .pipe(gulp.dest('dist/img'));
  19.  
  20.     return cssDist, fontsDist, jsDist, htmlDist, imgDist;
  21.  
  22. });
  23.    
  24. gulp.task('dest', function () {
  25.  
  26.     var cssDist = gulp.src([
  27.         'app/css/style.min.css',
  28.     ]).pipe(gulp.dest('dist/css'));
  29.     var fontsDist = gulp.src('app/fonts/**/*').pipe(gulp.dest('dist/fonts'));
  30.     var jsDist = gulp.src(['app/js/**/*', '!app/js/common.js']).pipe(gulp.dest('dist/js'));
  31.     var htmlDist = gulp.src(['app/*.html', '!app/template.html']).pipe(gulp.dest('dist'));
  32.     var imgDist = gulp.src('app/img/**/*')
  33.         .pipe(cache(imagemin({
  34.             interlaced: true,
  35.             progressive: true,
  36.             svgoPlugins: [{
  37.                 removeViewBox: false
  38.             }],
  39.             use: [pngquant()]
  40.         })))
  41.         .pipe(gulp.dest('dist/img'));
  42.  
  43.     return cssDist, fontsDist, jsDist, htmlDist, imgDist;
  44.  
  45. });
  46.  
  47. gulp.task('build', gulp.series('clean', 'sass', 'js', 'dest'));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top