[Libreoffice-commits] online.git: loleaflet/admin loleaflet/Makefile.am

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 16 15:12:18 UTC 2020


 loleaflet/Makefile.am          |   16 ++++++++++++---
 loleaflet/admin/build/build.js |   14 -------------
 loleaflet/admin/build/deps.js  |   43 -----------------------------------------
 3 files changed, 13 insertions(+), 60 deletions(-)

New commits:
commit 4ea1b49376f7da6361afedf016ebca26bd64748c
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Mar 12 16:37:06 2020 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Mon Mar 16 16:12:00 2020 +0100

    loleaflet: makefile: do not execute javascript to get admin files
    
    Change-Id: I84f3128499f038691abc762adec50c32f103b9f9
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90448
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Henry Castro <hcastro at collabora.com>

diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index 915117a83..3a09ef370 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -71,6 +71,16 @@ define npm_source
 	done
 endef
 
+LOLEAFLET_ADMIN_JS =\
+	admin/src/Base.js \
+	admin/src/Admin.js \
+	admin/src/AdminSocketBase.js \
+	admin/src/Util.js \
+	admin/src/AdminSocketOverview.js \
+	admin/src/AdminSocketAnalytics.js \
+	admin/src/AdminSocketSettings.js \
+	admin/src/AdminSocketHistory.js
+
 NODE_MODULES_SRC =\
 	autolinker at 1.4.3 \
 	json-js at 1.1.2 \
@@ -147,8 +157,6 @@ NODE_MODULES_JS_DST = $(patsubst %.js,$(builddir)/dist/%.js,$(NODE_MODULES_JS))
 LOLEAFLET_LIBS_JS_SRC = $(patsubst %.js,$(srcdir)/js/%.js,$(LOLEAFLET_LIBS_JS))
 LOLEAFLET_LIBS_JS_DST = $(patsubst %.js,$(builddir)/dist/%.js,$(LOLEAFLET_LIBS_JS))
 
-GET_FILES_JS = $(strip $(shell NODE_PATH=$(abs_builddir)/node_modules $(NODE) -e "try {console.log(require('$(1)').getFiles().join(' '))} catch(e) {}"))
-
 LOLEAFLET_JS =\
 	src/Leaflet.js \
 	src/errormessages.js \
@@ -335,7 +343,9 @@ $(builddir)/dist/admin-bundle.js: $(LOLEAFLET_ADMIN_DST) \
 $(LOLEAFLET_PREFIX)/dist/admin-src.js: $(LOLEAFLET_ADMIN_ALL)
 	@echo "Checking for admin JS errors..."
 	@NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/admin/src --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc
-	@awk 'FNR == 1 {print ""} 1' $(patsubst %.js,$(srcdir)/%.js,$(call GET_FILES_JS,$(srcdir)/admin/build/build.js)) > $@
+	@awk 'FNR == 1 {print ""} 1' $(patsubst %.js,$(srcdir)/%.js,$(LOLEAFLET_ADMIN_JS)) > $@
+
+
 
 if ENABLE_DEBUG
 $(LOLEAFLET_PREFIX)/dist/loleaflet-src.js: $(LOLEAFLET_JS_DST)
diff --git a/loleaflet/admin/build/build.js b/loleaflet/admin/build/build.js
deleted file mode 100644
index 96296fd3f..000000000
--- a/loleaflet/admin/build/build.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -*- js-indent-level: 8 -*- */
-var deps = require('./deps.js').deps;
-
-exports.getFiles = function () {
-	var files = [];
-
-	for (var i in deps) {
-		for (var j = 0, len = deps[i].src.length; j < len; j++) {
-			files.push('admin/' + deps[i].src[j]);
-		}
-	}
-
-	return files;
-};
diff --git a/loleaflet/admin/build/deps.js b/loleaflet/admin/build/deps.js
deleted file mode 100644
index f40535624..000000000
--- a/loleaflet/admin/build/deps.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- js-indent-level: 8 -*- */
-var deps = {
-	AdminCore: {
-		src: ['src/Base.js',
-		      'src/Admin.js',
-		      'src/AdminSocketBase.js'],
-		desc: 'Core admin scripts infrastructure'
-	},
-
-	Util: {
-		src: ['src/Util.js'],
-		desc: 'Utility class',
-		deps: ['AdminCore']
-	},
-
-	AdminSocketOverview: {
-		src: ['src/AdminSocketOverview.js'],
-		desc: 'Socket to handle messages in overview page.',
-		deps: ['AdminCore']
-	},
-
-	AdminSocketAnalytics: {
-		src: ['src/AdminSocketAnalytics.js'],
-		desc: 'Socket to handle messages in analytics page.',
-		deps: ['AdminCore']
-	},
-
-	AdminSocketSettings: {
-		src: ['src/AdminSocketSettings.js'],
-		desc: 'Socket to handle settings from server',
-		deps: ['AdminCore']
-	},
-
- 	AdminSocketHistory: {
-		src: ['src/AdminSocketHistory.js'],
-		desc: 'Socket to query document history.',
-		deps: ['AdminCore']
-	}
-};
-
-if (typeof exports !== 'undefined') {
-	exports.deps = deps;
-}


More information about the Libreoffice-commits mailing list