[Libreoffice-commits] online.git: loleaflet/build loleaflet/Jakefile.js loleaflet/plugins
Henry Castro
hcastro at collabora.com
Fri Apr 27 20:28:29 UTC 2018
loleaflet/Jakefile.js | 3 ++-
loleaflet/build/build.js | 6 +++---
loleaflet/plugins/draw-0.2.4/build/build.js | 4 ++--
3 files changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 8aaddac9265b4168d3053fd17dbab8b06efc94f7
Author: Henry Castro <hcastro at collabora.com>
Date: Fri Apr 27 15:53:44 2018 -0400
loleaflet: add builddir environment variable to Jake files
Change-Id: I565a375ebf2384d730d5bd2158e7d3f92ac01db2
diff --git a/loleaflet/Jakefile.js b/loleaflet/Jakefile.js
index d7ba999ee..09f98741e 100644
--- a/loleaflet/Jakefile.js
+++ b/loleaflet/Jakefile.js
@@ -13,6 +13,7 @@ For a custom build, open build/build.html in the browser and follow the instruct
*/
var build = require('./build/build.js'),
+ builddir = process.env.builddir ? process.env.builddir + '/' : '',
version = require('./src/Leaflet.js').version;
function hint(msg, args) {
@@ -72,7 +73,7 @@ file('dist/bundle.js', build.getBundleFiles(), {async: true}, function() {
});
desc('Create final bundle js file to be used by admin console');
-file('dist/admin-bundle.js', build.getAdminBundleFiles(), {async: true}, function() {
+file(builddir + 'dist/admin-bundle.js', build.getAdminBundleFiles(), {async: true}, function() {
var debug = process.env.debug === 'true';
var minify = process.env.minify === 'true';
diff --git a/loleaflet/build/build.js b/loleaflet/build/build.js
index 2c5baa0c7..a610e7b0c 100644
--- a/loleaflet/build/build.js
+++ b/loleaflet/build/build.js
@@ -4,7 +4,7 @@ var fs = require('fs'),
browserify = require('browserify'),
browserifyCss = require('browserify-css'),
exorcist = require('exorcist'),
-
+ builddir = process.env.builddir ? process.env.builddir + '/' : '',
deps = require('./deps.js').deps,
adminDeps = require('./adminDeps.js').adminDeps;
@@ -147,10 +147,10 @@ function bundle(files, destFilename, debug, minify, callback) {
global: true
}, 'uglifyify');
}
- var bundleFs = fs.createWriteStream('dist/' + destFilename);
+ var bundleFs = fs.createWriteStream(builddir + 'dist/' + destFilename);
var res = bundler.bundle();
if (debug) {
- res = res.pipe(exorcist('dist/' + destFilename + '.map'));
+ res = res.pipe(exorcist(builddir + 'dist/' + destFilename + '.map'));
}
res.pipe(bundleFs);
diff --git a/loleaflet/plugins/draw-0.2.4/build/build.js b/loleaflet/plugins/draw-0.2.4/build/build.js
index 967c6a9ea..e72dcca1a 100644
--- a/loleaflet/plugins/draw-0.2.4/build/build.js
+++ b/loleaflet/plugins/draw-0.2.4/build/build.js
@@ -1,7 +1,7 @@
var fs = require('fs'),
UglifyJS = require('uglify-js'),
zlib = require('zlib'),
-
+ builddir = process.env.builddir ? process.env.builddir + '/' : '',
deps = require('./deps.js').deps;
function getFiles(compsBase32) {
@@ -91,7 +91,7 @@ exports.build = function (callback, compsBase32, buildName) {
outro = '}(window, document));',
newSrc = copy + intro + combineFiles(files) + outro,
- pathPart = 'dist/leaflet.draw' + (buildName ? '-' + buildName : ''),
+ pathPart = builddir + 'dist/leaflet.draw' + (buildName ? '-' + buildName : ''),
srcPath = pathPart + '-src.js',
oldSrc = loadSilently(srcPath),
More information about the Libreoffice-commits
mailing list