loleaflet/Makefile.am | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
New commits: commit 9c2ca2d50213f7b7a66523de45f264d94d954a43 Author: Henry Castro <[email protected]> AuthorDate: Thu May 2 15:26:05 2019 -0400 Commit: Henry Castro <[email protected]> CommitDate: Thu May 2 15:53:28 2019 -0400 loleaflet: makefile: create variable to expand more JS libs It simplifies and expand more Javascript Libraries to be used in "loleaflet" bundle Change-Id: I94aab1989fcef844344a297cd511c796ba642bd4 diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index 83d613f2c..d4ac0e620 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -101,6 +101,10 @@ NODE_MODULES_JS =\ node_modules/vex-js/js/vex.dialog.js \ node_modules/@braintree/sanitize-url/dist.js +LOLEAFLET_LIBS_JS =\ + jquery.mCustomScrollbar.js \ + w2ui-1.5.rc1.js + if !ENABLE_MOBILEAPP NODE_MODULES_JS +=\ node_modules/l10n-for-node/l10n.js @@ -109,6 +113,9 @@ endif NODE_MODULES_JS_SRC = $(patsubst %.js,$(builddir)/%.js,$(NODE_MODULES_JS)) 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)) + LOLEAFLET_JS = $(strip $(shell NODE_PATH=$(abs_builddir)/node_modules $(NODE) -e "try {console.log(require('$(1)').getFiles().join(' '))} catch(e) {}")) LOLEAFLET_JS_SRC = $(shell find $(srcdir)/src -name '*.js') @@ -177,8 +184,7 @@ $(builddir)/dist/bundle.css: $(LOLEAFLET_CSS_DST) $(builddir)/dist/bundle.js: $(NODE_MODULES_JS_DST) \ $(LOLEAFLET_PREFIX)/dist/loleaflet-src.js \ - $(builddir)/dist/jquery.mCustomScrollbar.js \ - $(builddir)/dist/w2ui-1.5.rc1.js + $(LOLEAFLET_LIBS_JS_DST) @touch $@ else $(LOLEAFLET_PREFIX)/dist/loleaflet-src.js: $(LOLEAFLET_JS_SRC) @@ -202,14 +208,12 @@ $(builddir)/dist/global.js: $(srcdir)/js/global.js $(builddir)/dist/bundle.js: $(NODE_MODULES_JS_SRC) \ $(LOLEAFLET_PREFIX)/dist/loleaflet-src.js \ - $(srcdir)/js/jquery.mCustomScrollbar.js \ - $(srcdir)/js/w2ui-1.5.rc1.js + $(LOLEAFLET_LIBS_JS_SRC) @echo "Uglify loleaflet js files..." NODE_PATH=$(abs_builddir)/node_modules $(NODE) node_modules/uglify-js/bin/uglifyjs \ $(L10N_IOS_ALL_JS) \ $(NODE_MODULES_JS) \ - $(srcdir)/js/jquery.mCustomScrollbar.js \ - $(srcdir)/js/w2ui-1.5.rc1.js \ + $(LOLEAFLET_LIBS_JS_SRC) \ $(builddir)/build/dist/loleaflet-src.js \ --output $@ endif @@ -227,8 +231,7 @@ $(builddir)/dist/loleaflet.html: $(srcdir)/html/loleaflet.html.m4 $(LOLEAFLET_HT -DBUNDLE_CSS="$(abs_builddir)/dist/bundle.css" \ -DGLOBAL_JS="$(abs_builddir)/dist/global.js" \ -DLOLEAFLET_JS="$(subst $(SPACE),$(COMMA),$(NODE_MODULES_JS) \ - jquery.mCustomScrollbar.js \ - w2ui-1.5.rc1.js \ + $(LOLEAFLET_LIBS_JS) \ $(call LOLEAFLET_JS,$(srcdir)/build/build.js))" \ $(srcdir)/html/loleaflet.html.m4 > $@ _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
