From be3361155ee9ffc19fd14701ea2efc3aecbb1420 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Tue, 24 Nov 2015 19:44:10 +0800 Subject: [PATCH] gulp rename rule optimize --- gulpfile.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index dfc41d7..14829a4 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -27,7 +27,9 @@ gulp.task('copy', function () { gulp.task('compressJS', function() { gulp.src(['src/*.js']) .pipe(uglify()) - .pipe(rename('APlayer.min.js')) + .pipe(rename({ + suffix: ".min" + })) .pipe(gulp.dest('build')) .pipe(browserSync.stream()); }); @@ -38,7 +40,9 @@ gulp.task('compressCSS', function() { .pipe(sass()) .pipe(prefix(['last 15 versions', '> 1%', 'ie 8', 'ie 7'], { cascade: true })) .pipe(minifyCSS()) - .pipe(rename('APlayer.min.css')) + .pipe(rename({ + suffix: ".min" + })) .pipe(gulp.dest('build')) .pipe(browserSync.stream()); });