diff options
author | Henry Castro <hcastro@collabora.com> | 2018-05-26 23:24:34 -0400 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-06-01 16:25:35 +0200 |
commit | d5c1c9b82383fc7b773f1917c23d070416fb7f07 (patch) | |
tree | 8864c6cebd3c8acddd729e88dc8edc2382ebcdc2 /loleaflet | |
parent | 98dd66e1e46ca2dd5d5010c07441f22f6be5af0d (diff) |
loleaflet: isolate the admin build process
Change-Id: Ib48ef2b0e6c778a65be949da1eb164cf5f87692d
(cherry picked from commit 3571919a50ac91aa0fa0bb257be2cbd8be55f647)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'loleaflet')
-rw-r--r-- | loleaflet/Makefile.am | 17 | ||||
-rw-r--r-- | loleaflet/admin/build/build.js | 13 | ||||
-rw-r--r-- | loleaflet/admin/build/deps.js (renamed from loleaflet/build/adminDeps.js) | 20 | ||||
-rw-r--r-- | loleaflet/admin/src/Admin.js (renamed from loleaflet/src/admin/Admin.js) | 0 | ||||
-rw-r--r-- | loleaflet/admin/src/AdminSocketAnalytics.js (renamed from loleaflet/src/admin/AdminSocketAnalytics.js) | 0 | ||||
-rw-r--r-- | loleaflet/admin/src/AdminSocketBase.js (renamed from loleaflet/src/admin/AdminSocketBase.js) | 0 | ||||
-rw-r--r-- | loleaflet/admin/src/AdminSocketHistory.js (renamed from loleaflet/src/admin/AdminSocketHistory.js) | 0 | ||||
-rw-r--r-- | loleaflet/admin/src/AdminSocketOverview.js (renamed from loleaflet/src/admin/AdminSocketOverview.js) | 0 | ||||
-rw-r--r-- | loleaflet/admin/src/AdminSocketSettings.js (renamed from loleaflet/src/admin/AdminSocketSettings.js) | 0 | ||||
-rw-r--r-- | loleaflet/admin/src/Base.js (renamed from loleaflet/src/admin/Base.js) | 0 | ||||
-rw-r--r-- | loleaflet/admin/src/Util.js (renamed from loleaflet/src/admin/Util.js) | 0 |
11 files changed, 31 insertions, 19 deletions
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 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 index 96e1db75f..96e1db75f 100644 --- a/loleaflet/src/admin/Admin.js +++ b/loleaflet/admin/src/Admin.js diff --git a/loleaflet/src/admin/AdminSocketAnalytics.js b/loleaflet/admin/src/AdminSocketAnalytics.js index 8af70e029..8af70e029 100644 --- a/loleaflet/src/admin/AdminSocketAnalytics.js +++ b/loleaflet/admin/src/AdminSocketAnalytics.js diff --git a/loleaflet/src/admin/AdminSocketBase.js b/loleaflet/admin/src/AdminSocketBase.js index 1d5182453..1d5182453 100644 --- a/loleaflet/src/admin/AdminSocketBase.js +++ b/loleaflet/admin/src/AdminSocketBase.js diff --git a/loleaflet/src/admin/AdminSocketHistory.js b/loleaflet/admin/src/AdminSocketHistory.js index f3fca24cf..f3fca24cf 100644 --- a/loleaflet/src/admin/AdminSocketHistory.js +++ b/loleaflet/admin/src/AdminSocketHistory.js diff --git a/loleaflet/src/admin/AdminSocketOverview.js b/loleaflet/admin/src/AdminSocketOverview.js index 01cf754f9..01cf754f9 100644 --- a/loleaflet/src/admin/AdminSocketOverview.js +++ b/loleaflet/admin/src/AdminSocketOverview.js diff --git a/loleaflet/src/admin/AdminSocketSettings.js b/loleaflet/admin/src/AdminSocketSettings.js index 71e6bf9de..71e6bf9de 100644 --- a/loleaflet/src/admin/AdminSocketSettings.js +++ b/loleaflet/admin/src/AdminSocketSettings.js diff --git a/loleaflet/src/admin/Base.js b/loleaflet/admin/src/Base.js index 837539930..837539930 100644 --- a/loleaflet/src/admin/Base.js +++ b/loleaflet/admin/src/Base.js diff --git a/loleaflet/src/admin/Util.js b/loleaflet/admin/src/Util.js index 467bac97a..467bac97a 100644 --- a/loleaflet/src/admin/Util.js +++ b/loleaflet/admin/src/Util.js |