From 08abf516d04413652e81b3489a27df78452eba13 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 15 Apr 2016 23:42:25 +0200 Subject: [PATCH] make sure everything ends up in bucket root --- gulpfile.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 367b2fd2..a86b22fc 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -370,7 +370,7 @@ gulp.task('deploy', function() { "region": S3REGION }); - return gulp.src(DIST + '**/*') + return gulp.src(DIST + '/**/*') .pipe($.awspublishRouter({ cache: { // cache for 5 minutes by default @@ -398,6 +398,10 @@ gulp.task('deploy', function() { "^.+$": "$&" } })) + // make sure everything goes to the root '/' + .pipe($.rename(function (path) { + path.dirname = S3PATH + path.dirname; + })) .pipe(parallelize(publisher.publish({}, 'force'), 10)) .pipe(publisher.sync()) // delete files in bucket that are not in local folder .pipe($.awspublish.reporter({