From 0ed43096978ea80e5fba622de205339ba3865b8e Mon Sep 17 00:00:00 2001 From: jos Date: Mon, 24 Nov 2014 10:43:22 +0100 Subject: [PATCH] Add a newline to the minified vis.min.js file to prevent issues when concatenating downstream (see #447) --- gulpfile.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 64729d68..c6b99744 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -121,7 +121,10 @@ gulp.task('copy', ['clean'], function () { gulp.task('minify', ['bundle-js'], function (cb) { var result = uglify.minify([DIST + '/' + VIS_JS], uglifyConfig); - fs.writeFileSync(DIST + '/' + VIS_MIN_JS, result.code); + // note: we add a newline '\n' to the end of the minified file to prevent + // any issues when concatenating the file downstream (the file ends + // with a comment). + fs.writeFileSync(DIST + '/' + VIS_MIN_JS, result.code + '\n'); fs.writeFileSync(DIST + '/' + VIS_MAP, result.map); cb();