Changing separator when concatenating js files

I’m pulling in some external 3rd party scripts which break if there’s no ‘;’ character between them when they’re concatenated. How can I modify the gulp file to achieve this? I think the gulp-concat option I need to pass in is {newLine: ‘;’}, but i’m not sure how to pass this option to gulp-concat.

Thanks to Kalen Johnson’s answer to a similar question, I finally got this working. See my comment on Gulp minifyCss and CSS Special Comments.

Basically, it required changing the following line in Sage’s gulpfile.js:

.pipe($.concat, filename)


.pipe(function(filename) {
  return $.concat(filename, {newLine: ';'});
}, filename)

I’m not 100% sure it’s the correct way, but it seems to work.