[Libreoffice-commits] online.git: .gitignore loleaflet/build loleaflet/Jakefile.js loleaflet/main-admin.js

Henry Castro hcastro at collabora.com
Sat May 19 14:28:10 UTC 2018


 .gitignore               |    1 -
 loleaflet/Jakefile.js    |    2 +-
 loleaflet/build/build.js |    7 ++++---
 loleaflet/main-admin.js  |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit a56b49daedf4361613bbc57222bd1f813e5bc86d
Author: Henry Castro <hcastro at collabora.com>
Date:   Sat May 19 09:59:56 2018 -0400

    loleaflet: add more node paths when bundling admin files
    
    Change-Id: I73190834b92d9ab32944b09b8bd1abe47797984d

diff --git a/.gitignore b/.gitignore
index f596c54b4..29791ac3d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,7 +53,6 @@ loolwsd.log
 
 # lolefalet
 loleaflet/dist
-loleaflet/admin/admin-src.js
 
 connect
 lokitclient
diff --git a/loleaflet/Jakefile.js b/loleaflet/Jakefile.js
index 04a9f2e79..a0a230567 100644
--- a/loleaflet/Jakefile.js
+++ b/loleaflet/Jakefile.js
@@ -54,7 +54,7 @@ file('dist/leaflet-src.js', build.getFiles(), {async: true}, function() {
 });
 
 desc('Create a combined admin file');
-file('admin/admin-src.js', build.getAdminFiles(), {async: true}, function() {
+file(builddir +'dist/admin-src.js', build.getAdminFiles(), {async: true}, function() {
 	var lint = jake.Task['lintadmin'];
 	lint.addListener('complete', function(value) {
 		console.log('Building admin-src.js ...');
diff --git a/loleaflet/build/build.js b/loleaflet/build/build.js
index 519d0753a..9e4082269 100644
--- a/loleaflet/build/build.js
+++ b/loleaflet/build/build.js
@@ -33,7 +33,7 @@ var CSSBundleFiles = [
 
 var adminBundleFiles = [
 	'main-admin.js',
-	'admin/admin-src.js',
+	builddir + 'dist/admin-src.js',
 	'admin/bootstrap/ie10-viewport-bug-workaround.css',
 	'admin.strings.js',
 	'admin/bootstrap/holder.min.js',
@@ -139,7 +139,8 @@ function bytesToKB(bytes) {
 }
 
 function bundle(files, destFilename, debug, minify, callback) {
-	var node_paths = builddir !== '' ? [builddir + 'node_modules'] : [process.cwd() +'/node_modules']
+	var node_paths = builddir !== '' ? [builddir + 'node_modules', builddir + 'dist'] :
+		[process.cwd() +'/node_modules', process.cwd() + '/dist']
 	var bundler = browserify(files, {debug: debug, paths:node_paths});
 	bundler = bundler.transform(browserifyCss, {global:true});
 	if (minify) {
@@ -233,7 +234,7 @@ exports.build = function (callback, version, compsBase32, buildName) {
 exports.buildadmin = function(callback) {
 	// TODO: Also minify if admin complexity increases in future
 	var adminNewSrc = combineFiles(getAdminFiles()),
-	    adminPath = 'admin/admin-src.js',
+	    adminPath = builddir + 'dist/admin-src.js',
 	    adminOldSrc = loadSilently(adminPath),
 	    adminSrcDelta = getSizeDelta(adminNewSrc, adminOldSrc, true);
 
diff --git a/loleaflet/main-admin.js b/loleaflet/main-admin.js
index 02ae99491..928f3ce94 100644
--- a/loleaflet/main-admin.js
+++ b/loleaflet/main-admin.js
@@ -26,4 +26,4 @@ global.d3 = require('d3');
 require('bootstrap/dist/js/bootstrap.js');
 require('./admin/bootstrap/holder.min.js');
 require('./admin/bootstrap/ie10-viewport-bug-workaround.js');
-global.Admin = require('./admin/admin-src.js');
+global.Admin = require('admin-src.js');


More information about the Libreoffice-commits mailing list