jussi-kalliokoski / gulp-awspublish-router

A router for defining file-specific rules with gulp-awspublish
29 stars 7 forks source link

Breaks in Gulp 4, adds leading slash #19

Closed damonmaria closed 6 years ago

damonmaria commented 6 years ago

I think a change in Vinyl has broken this package. file.base will not have a trailing slash according to the Vinyl docs. Therefore this line in initFile.js:

file.s3.path = file.path.replace(file.base, "").replace(new RegExp("\\" + path.sep, "g"), "/")

Will end up with a leading slash. Which then causes all files in S3 to be put into a top level 'directory' with no name.

jussi-kalliokoski commented 6 years ago

Thanks for reporting and debugging! :heart: :tada:

Fixed in https://github.com/jussi-kalliokoski/gulp-awspublish-router/commit/a8fc995349ff2ad710b07e121053d0abb4981515 and released as v0.1.4.

Closing, let me know if the fix didn't work for you.