[Libreoffice-commits] online.git: loleaflet/build
Pranav Kant
pranavk at collabora.co.uk
Thu Aug 11 16:14:36 UTC 2016
loleaflet/build/build.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 461e1d5cb008cb152310d86e8d12fdde4bf1a0a5
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Thu Aug 11 21:38:13 2016 +0530
loleaflet: Externalize source-maps only if debug=true
Otherwise, running exorcist when debug is off gives a broken
bundle.js
diff --git a/loleaflet/build/build.js b/loleaflet/build/build.js
index 00a613c..5f8a89c 100644
--- a/loleaflet/build/build.js
+++ b/loleaflet/build/build.js
@@ -104,7 +104,11 @@ function bundle(files, destFilename, debug) {
global: true
}, 'uglifyify');
var bundleFs = fs.createWriteStream('dist/' + destFilename);
- bundler.bundle().pipe(exorcist('dist/' + destFilename + '.map')).pipe(bundleFs);
+ var res = bundler.bundle();
+ if (debug) {
+ res = res.pipe(exorcist('dist/' + destFilename + '.map'));
+ }
+ res.pipe(bundleFs);
bundleFs.on('finish', function() {
console.log('Finish writing to dist/' + destFilename);
More information about the Libreoffice-commits
mailing list