[Libreoffice-commits] online.git: loleaflet/admin loleaflet/build loleaflet/Makefile.am loleaflet/src
Henry Castro
hcastro at collabora.com
Sun May 27 03:32:49 UTC 2018
loleaflet/Makefile.am | 17 ++++++++---------
loleaflet/admin/build/build.js | 13 +++++++++++++
loleaflet/admin/build/deps.js | 20 ++++++++++----------
3 files changed, 31 insertions(+), 19 deletions(-)
New commits:
commit 3571919a50ac91aa0fa0bb257be2cbd8be55f647
Author: Henry Castro <hcastro at collabora.com>
Date: Sat May 26 23:24:34 2018 -0400
loleaflet: isolate the admin build process
Change-Id: Ib48ef2b0e6c778a65be949da1eb164cf5f87692d
diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index ad6629b52..67fea24c8 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -93,7 +93,6 @@ GLOBAL_JS =\
global.js
LOLEAFLET_JS = $(strip $(shell NODE_PATH=$(abs_builddir)/node_modules $(NODE) -e "try {console.log(require('$(1)').getFiles().join(' '))} catch(e) {}"))
-ADMIN_JS = $(strip $(shell NODE_PATH=$(abs_builddir)/node_modules $(NODE) -e "try {console.log(require('$(1)').getAdminFiles().join(' '))} catch(e) {}"))
PLUGINS_JS =\
w2ui-1.5.rc1.js \
@@ -130,8 +129,8 @@ $(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)/src/admin --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc
- @awk 'FNR == 1 {print ""} 1' $(patsubst %.js,$(srcdir)/%.js,$(call ADMIN_JS,$(srcdir)/build/build.js)) > $@
+# @NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/admin --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc
+ @awk 'FNR == 1 {print ""} 1' $(patsubst %.js,$(srcdir)/%.js,$(call LOLEAFLET_JS,$(srcdir)/admin/build/build.js)) > $@
if ENABLE_DEBUG
$(LOLEAFLET_PREFIX)/dist/loleaflet-src.js: $(LOLEAFLET_JS_DST) $(LOLEAFLET_DRAW_JS_DST)
@@ -250,12 +249,12 @@ pot:
admin/admin.strings.js \
src/errormessages.js \
js/toolbar.js \
- src/admin/AdminSocketAnalytics.js \
- src/admin/AdminSocketBase.js \
- src/admin/AdminSocketOverview.js \
- src/admin/AdminSocketHistory.js \
- src/admin/AdminSocketSettings.js \
- src/admin/Util.js \
+ admin/src/AdminSocketAnalytics.js \
+ admin/src/AdminSocketBase.js \
+ admin/src/AdminSocketOverview.js \
+ admin/src/AdminSocketHistory.js \
+ admin/src/AdminSocketSettings.js \
+ admin/src/Util.js \
src/control/Control.AlertDialog.js \
src/control/Control.ColumnHeader.js \
src/control/Control.ContextMenu.js \
diff --git a/loleaflet/admin/build/build.js b/loleaflet/admin/build/build.js
new file mode 100644
index 000000000..b90ad16fd
--- /dev/null
+++ b/loleaflet/admin/build/build.js
@@ -0,0 +1,13 @@
+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/build/adminDeps.js b/loleaflet/admin/build/deps.js
similarity index 63%
rename from loleaflet/build/adminDeps.js
rename to loleaflet/admin/build/deps.js
index f6efdad92..21356fe6c 100644
--- a/loleaflet/build/adminDeps.js
+++ b/loleaflet/admin/build/deps.js
@@ -1,42 +1,42 @@
-var adminDeps = {
+var deps = {
AdminCore: {
- src: ['admin/Base.js',
- 'admin/Admin.js',
- 'admin/AdminSocketBase.js'],
+ src: ['src/Base.js',
+ 'src/Admin.js',
+ 'src/AdminSocketBase.js'],
desc: 'Core admin scripts infrastructure'
},
Util: {
- src: ['admin/Util.js'],
+ src: ['src/Util.js'],
desc: 'Utility class',
deps: ['AdminCore']
},
AdminSocketOverview: {
- src: ['admin/AdminSocketOverview.js'],
+ src: ['src/AdminSocketOverview.js'],
desc: 'Socket to handle messages in overview page.',
deps: ['AdminCore']
},
AdminSocketAnalytics: {
- src: ['admin/AdminSocketAnalytics.js'],
+ src: ['src/AdminSocketAnalytics.js'],
desc: 'Socket to handle messages in analytics page.',
deps: ['AdminCore']
},
AdminSocketSettings: {
- src: ['admin/AdminSocketSettings.js'],
+ src: ['src/AdminSocketSettings.js'],
desc: 'Socket to handle settings from server',
deps: ['AdminCore']
},
AdminSocketHistory: {
- src: ['admin/AdminSocketHistory.js'],
+ src: ['src/AdminSocketHistory.js'],
desc: 'Socket to query document history.',
deps: ['AdminCore']
}
};
if (typeof exports !== 'undefined') {
- exports.adminDeps = adminDeps;
+ exports.deps = deps;
}
diff --git a/loleaflet/src/admin/Admin.js b/loleaflet/admin/src/Admin.js
similarity index 100%
rename from loleaflet/src/admin/Admin.js
rename to loleaflet/admin/src/Admin.js
diff --git a/loleaflet/src/admin/AdminSocketAnalytics.js b/loleaflet/admin/src/AdminSocketAnalytics.js
similarity index 100%
rename from loleaflet/src/admin/AdminSocketAnalytics.js
rename to loleaflet/admin/src/AdminSocketAnalytics.js
diff --git a/loleaflet/src/admin/AdminSocketBase.js b/loleaflet/admin/src/AdminSocketBase.js
similarity index 100%
rename from loleaflet/src/admin/AdminSocketBase.js
rename to loleaflet/admin/src/AdminSocketBase.js
diff --git a/loleaflet/src/admin/AdminSocketHistory.js b/loleaflet/admin/src/AdminSocketHistory.js
similarity index 100%
rename from loleaflet/src/admin/AdminSocketHistory.js
rename to loleaflet/admin/src/AdminSocketHistory.js
diff --git a/loleaflet/src/admin/AdminSocketOverview.js b/loleaflet/admin/src/AdminSocketOverview.js
similarity index 100%
rename from loleaflet/src/admin/AdminSocketOverview.js
rename to loleaflet/admin/src/AdminSocketOverview.js
diff --git a/loleaflet/src/admin/AdminSocketSettings.js b/loleaflet/admin/src/AdminSocketSettings.js
similarity index 100%
rename from loleaflet/src/admin/AdminSocketSettings.js
rename to loleaflet/admin/src/AdminSocketSettings.js
diff --git a/loleaflet/src/admin/Base.js b/loleaflet/admin/src/Base.js
similarity index 100%
rename from loleaflet/src/admin/Base.js
rename to loleaflet/admin/src/Base.js
diff --git a/loleaflet/src/admin/Util.js b/loleaflet/admin/src/Util.js
similarity index 100%
rename from loleaflet/src/admin/Util.js
rename to loleaflet/admin/src/Util.js
More information about the Libreoffice-commits
mailing list