[Libreoffice-commits] online.git: loleaflet/admin loleaflet/bootstrap loleaflet/build loleaflet/cursors loleaflet/dist loleaflet/Jakefile.js loleaflet/main-admin.js loleaflet/Makefile.am
Henry Castro
hcastro at collabora.com
Thu May 10 18:50:09 UTC 2018
loleaflet/Jakefile.js | 2 -
loleaflet/Makefile.am | 56 +++++++++++++++++++++++++++++++++--------------
loleaflet/build/build.js | 10 ++++----
loleaflet/main-admin.js | 10 ++++----
4 files changed, 51 insertions(+), 27 deletions(-)
New commits:
commit 04f17a012ff873808f93873a196ed1aa95fd77b3
Author: Henry Castro <hcastro at collabora.com>
Date: Thu May 10 13:41:37 2018 -0400
loleaflet: fix build in admin files
Change-Id: I0e96b18e6319ce0d4456c16f0fce008e4e4c4966
diff --git a/loleaflet/Jakefile.js b/loleaflet/Jakefile.js
index 3bfa14c40..04a9f2e79 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('dist/admin/admin-src.js', build.getAdminFiles(), {async: true}, function() {
+file('admin/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/Makefile.am b/loleaflet/Makefile.am
index 7166a6de9..68ea2131e 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -27,6 +27,15 @@ LOLEAFLET_DRAW_CSS_SRC = $(shell find $(srcdir)/plugins/draw-$(DRAW_VERSION)/dis
LOLEAFLET_HTML_SRC = $(shell find $(srcdir)/html -name '*.html')
LOLEAFLET_HTML_DST = $(patsubst $(srcdir)/html/%.html,$(builddir)/dist/%.html,$(LOLEAFLET_HTML_SRC))
+LOLEAFLET_ADMIN_SRC = $(shell find $(srcdir)/admin -name '*.html')
+LOLEAFLET_ADMIN_DST = $(patsubst $(srcdir)/admin/%,$(builddir)/dist/admin/%,$(LOLEAFLET_ADMIN_SRC))
+
+BOOTSTRAP_SRC = $(shell find $(srcdir)/bootstrap -name '*.*')
+BOOTSTRAP_DST = $(patsubst $(srcdir)/bootstrap/%,$(builddir)/dist/bootstrap/%,$(BOOTSTRAP_SRC))
+
+CURSORS_SRC = $(shell find $(srcdir)/cursors -name '*.*')
+CURSORS_DST = $(patsubst $(srcdir)/cursors/%,$(builddir)/dist/cursors/%,$(CURSORS_SRC))
+
define file_target
$(1): $(2)
@cp $$< $$@
@@ -93,7 +102,7 @@ GLOBAL_JS =\
LOLEAFLET_JS = $(strip $(shell NODE_PATH=$(abs_builddir)/node_modules $(NODE) -e "try {console.log(require('$(1)').getFiles().join(' '))} catch(e) {}"))
PLUGINS_JS =\
- loleaflet.draw-src.js \
+ leaflet.draw-src.js \
w2ui-1.5.rc1.js \
main.js \
toolbar.js
@@ -105,7 +114,7 @@ COMMA := ,
EMPTY :=
SPACE := $(EMPTY) $(EMPTY)
LOLEAFLET_VERSION = $(shell cd $(srcdir) && git log -1 --pretty=format:"%h")
-LOLEAFLET_PREFIX := $(if $(ENABLE_DEBUG),$(builddir)/dist,$(builddir)/build)
+LOLEAFLET_PREFIX := $(if $(ENABLE_DEBUG),$(abs_builddir),$(abs_builddir)/build)
EXTRA_DIST = $(shell find . -type f -not -path './.git/*' | sed 's/.\///')
@@ -114,24 +123,27 @@ all-local: | node_modules \
$(L10N_JSON) \
$(LOLEAFLET_IMAGES_DST) \
$(JQUERY_UI_DIST_IMAGES) \
- $(LOLEAFLET_PREFIX)/loleaflet.draw-src.js \
- $(LOLEAFLET_PREFIX)/loleaflet-src.js \
+ $(LOLEAFLET_PREFIX)/dist/leaflet.draw-src.js \
+ $(LOLEAFLET_PREFIX)/dist/loleaflet-src.js \
+ $(builddir)/dist/admin-bundle.js \
$(builddir)/dist/bundle.css \
$(builddir)/dist/bundle.js \
$(builddir)/dist/loleaflet.html
@echo "build loleaflet completed"
-$(LOLEAFLET_PREFIX)/loleaflet.draw-src.js: $(LOLEAFLET_DRAW_CSS_SRC) $(LOLEAFLET_DRAW_JS_SRC)
+$(LOLEAFLET_PREFIX)/dist/leaflet.draw-src.js: $(LOLEAFLET_DRAW_CSS_SRC) $(LOLEAFLET_DRAW_JS_SRC)
@mkdir -p $(dir $@)
- @NODE_PATH=$(abs_builddir)/node_modules jake -f $(srcdir)/plugins/draw-$(DRAW_VERSION)/Jakefile.js -C $(srcdir)/plugins/draw-$(DRAW_VERSION) build
+ @NODE_PATH=$(abs_builddir)/node_modules jake -f $(srcdir)/plugins/draw-$(DRAW_VERSION)/Jakefile.js -C $(srcdir)/plugins/draw-$(DRAW_VERSION) build debug=$(ENABLE_DEBUG) minify=$(MINIFY) builddir=$(LOLEAFLET_PREFIX)
if ENABLE_DEBUG
@cp $(LOLEAFLET_DRAW_CSS_SRC) $(builddir)/dist/
endif
@cp -a $(srcdir)/plugins/draw-$(DRAW_VERSION)/dist/images/* $(builddir)/dist/images/
- @cp -a $(srcdir)/plugins/draw-$(DRAW_VERSION)/dist/leaflet.draw-src.js $@
+
+$(builddir)/dist/admin-bundle.js: $(LOLEAFLET_ADMIN_DST) $(BOOTSTRAP_DST) $(CURSORS_DST)
+ @NODE_PATH=$(abs_builddir)/node_modules jake -f $(srcdir)/Jakefile.js -C $(srcdir) $(abs_builddir)/dist/admin-bundle.js debug=$(ENABLE_DEBUG) minify=$(MINIFY) builddir=$(abs_builddir)
if ENABLE_DEBUG
-$(LOLEAFLET_PREFIX)/loleaflet-src.js: $(LOLEAFLET_JS_DST)
+$(LOLEAFLET_PREFIX)/dist/loleaflet-src.js: $(LOLEAFLET_JS_DST)
@echo "Checking loleaflet for JS errors..."
@$(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/src --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc
@touch $@
@@ -140,13 +152,13 @@ $(builddir)/dist/bundle.css: $(LOLEAFLET_CSS_DST)
@touch $@
$(builddir)/dist/bundle.js: $(NODE_MODULES_JS_DST) \
- $(LOLEAFLET_PREFIX)/loleaflet-src.js \
- $(LOLEAFLET_PREFIX)/loleaflet.draw-src.js \
+ $(LOLEAFLET_PREFIX)/dist/loleaflet-src.js \
+ $(LOLEAFLET_PREFIX)/dist/leaflet.draw-src.js \
$(builddir)/dist/global.js $(builddir)/dist/w2ui-1.5.rc1.js \
$(builddir)/dist/main.js $(builddir)/dist/toolbar.js
@touch $@
else
-$(LOLEAFLET_PREFIX)/loleaflet-src.js: $(LOLEAFLET_JS_SRC)
+$(LOLEAFLET_PREFIX)/dist/loleaflet-src.js: $(LOLEAFLET_JS_SRC)
@mkdir -p $(dir $@)
@echo "Checking loleaflet for JS errors..."
@$(NODE) node_modules/eslint/bin/eslint.js $(srcdir)/src --ignore-path $(srcdir)/.eslintignore --config $(srcdir)/.eslintrc
@@ -161,16 +173,16 @@ $(builddir)/dist/bundle.css: $(LOLEAFLET_CSS)
@$(NODE) node_modules/uglifycss/uglifycss $(LOLEAFLET_CSS) > $@
$(builddir)/dist/bundle.js: $(NODE_MODULES_JS_SRC) \
- $(LOLEAFLET_PREFIX)/loleaflet-src.js \
- $(LOLEAFLET_PREFIX)/loleaflet.draw-src.js \
+ $(LOLEAFLET_PREFIX)/dist/loleaflet-src.js \
+ $(LOLEAFLET_PREFIX)/dist/leaflet.draw-src.js \
$(srcdir)/js/global.js $(srcdir)/js/w2ui-1.5.rc1.js \
$(srcdir)/js/main.js $(srcdir)/js/toolbar.js
@echo "Uglify loleaflet js files..."
@$(NODE) node_modules/uglify-js/bin/uglifyjs \
$(srcdir)/js/global.js \
$(NODE_MODULES_JS) \
- $(builddir)/build/loleaflet-src.js \
- $(builddir)/build/loleaflet.draw-src.js \
+ $(builddir)/build/dist/loleaflet-src.js \
+ $(builddir)/build/dist/leaflet.draw-src.js \
$(srcdir)/js/w2ui-1.5.rc1.js \
$(srcdir)/js/main.js \
$(srcdir)/js/toolbar.js \
@@ -224,6 +236,18 @@ $(builddir)/dist/l10n/%: $(srcdir)/l10n/%
$(builddir)/dist/l10n/%.json: $(srcdir)/po/%.po
@$(srcdir)/util/po2json.py $< -o $@
+$(builddir)/dist/admin/%: $(srcdir)/admin/%
+ @mkdir -p $(dir $@)
+ @cp $< $@
+
+$(builddir)/dist/bootstrap/%: $(srcdir)/bootstrap/%
+ @mkdir -p $(dir $@)
+ @cp $< $@
+
+$(builddir)/dist/cursors/%: $(srcdir)/cursors/%
+ @mkdir -p $(dir $@)
+ @cp $< $@
+
install-data-hook:
mkdir -p $(DESTDIR)$(pkgdatadir)/loleaflet; \
cp -ar dist/ $(DESTDIR)$(pkgdatadir)/loleaflet/;
@@ -269,7 +293,7 @@ clean-local:
rm -rf $(builddir)/dist/images
rm -rf $(builddir)/dist/l10n
rm -rf $(builddir)/build/loleaflet-src.js
- rm -rf $(builddir)/build/loleaflet.draw-src.js
+ rm -rf $(builddir)/build/leaflet.draw-src.js
rm -f $(builddir)/dist/*.html
cd dist && rm -f bundle.js bundle.css bundle.js.map admin-bundle.js admin-bundle.js.map
cd $(srcdir)/plugins/draw-$(DRAW_VERSION) && rm -f dist/*.js
diff --git a/loleaflet/dist/admin/admin.html b/loleaflet/admin/admin.html
similarity index 100%
rename from loleaflet/dist/admin/admin.html
rename to loleaflet/admin/admin.html
diff --git a/loleaflet/dist/admin/adminAnalytics.html b/loleaflet/admin/adminAnalytics.html
similarity index 100%
rename from loleaflet/dist/admin/adminAnalytics.html
rename to loleaflet/admin/adminAnalytics.html
diff --git a/loleaflet/dist/admin/adminHistory.html b/loleaflet/admin/adminHistory.html
similarity index 100%
rename from loleaflet/dist/admin/adminHistory.html
rename to loleaflet/admin/adminHistory.html
diff --git a/loleaflet/dist/admin/adminSettings.html b/loleaflet/admin/adminSettings.html
similarity index 100%
rename from loleaflet/dist/admin/adminSettings.html
rename to loleaflet/admin/adminSettings.html
diff --git a/loleaflet/dist/admin/bootstrap/LICENSE b/loleaflet/admin/bootstrap/LICENSE
similarity index 100%
rename from loleaflet/dist/admin/bootstrap/LICENSE
rename to loleaflet/admin/bootstrap/LICENSE
diff --git a/loleaflet/dist/admin/bootstrap/dashboard.css b/loleaflet/admin/bootstrap/dashboard.css
similarity index 100%
rename from loleaflet/dist/admin/bootstrap/dashboard.css
rename to loleaflet/admin/bootstrap/dashboard.css
diff --git a/loleaflet/dist/admin/bootstrap/holder.min.js b/loleaflet/admin/bootstrap/holder.min.js
similarity index 100%
rename from loleaflet/dist/admin/bootstrap/holder.min.js
rename to loleaflet/admin/bootstrap/holder.min.js
diff --git a/loleaflet/dist/admin/bootstrap/ie10-viewport-bug-workaround.css b/loleaflet/admin/bootstrap/ie10-viewport-bug-workaround.css
similarity index 100%
rename from loleaflet/dist/admin/bootstrap/ie10-viewport-bug-workaround.css
rename to loleaflet/admin/bootstrap/ie10-viewport-bug-workaround.css
diff --git a/loleaflet/dist/admin/bootstrap/ie10-viewport-bug-workaround.js b/loleaflet/admin/bootstrap/ie10-viewport-bug-workaround.js
similarity index 100%
rename from loleaflet/dist/admin/bootstrap/ie10-viewport-bug-workaround.js
rename to loleaflet/admin/bootstrap/ie10-viewport-bug-workaround.js
diff --git a/loleaflet/dist/admin/dashboard.css b/loleaflet/admin/dashboard.css
similarity index 100%
rename from loleaflet/dist/admin/dashboard.css
rename to loleaflet/admin/dashboard.css
diff --git a/loleaflet/dist/bootstrap/LICENSE b/loleaflet/bootstrap/LICENSE
similarity index 100%
rename from loleaflet/dist/bootstrap/LICENSE
rename to loleaflet/bootstrap/LICENSE
diff --git a/loleaflet/dist/bootstrap/dashboard.css b/loleaflet/bootstrap/dashboard.css
similarity index 100%
rename from loleaflet/dist/bootstrap/dashboard.css
rename to loleaflet/bootstrap/dashboard.css
diff --git a/loleaflet/dist/bootstrap/holder.min.js b/loleaflet/bootstrap/holder.min.js
similarity index 100%
rename from loleaflet/dist/bootstrap/holder.min.js
rename to loleaflet/bootstrap/holder.min.js
diff --git a/loleaflet/dist/bootstrap/ie10-viewport-bug-workaround.js b/loleaflet/bootstrap/ie10-viewport-bug-workaround.js
similarity index 100%
rename from loleaflet/dist/bootstrap/ie10-viewport-bug-workaround.js
rename to loleaflet/bootstrap/ie10-viewport-bug-workaround.js
diff --git a/loleaflet/build/build.js b/loleaflet/build/build.js
index 9ea9e9eac..519d0753a 100644
--- a/loleaflet/build/build.js
+++ b/loleaflet/build/build.js
@@ -33,11 +33,11 @@ var CSSBundleFiles = [
var adminBundleFiles = [
'main-admin.js',
- 'dist/admin/admin-src.js',
- 'dist/admin/bootstrap/ie10-viewport-bug-workaround.css',
+ 'admin/admin-src.js',
+ 'admin/bootstrap/ie10-viewport-bug-workaround.css',
'admin.strings.js',
- 'dist/admin/bootstrap/holder.min.js',
- 'dist/admin/bootstrap/ie10-viewport-bug-workaround.js'
+ 'admin/bootstrap/holder.min.js',
+ 'admin/bootstrap/ie10-viewport-bug-workaround.js'
];
exports.getBundleFiles = function() {
@@ -233,7 +233,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 = 'dist/admin/admin-src.js',
+ adminPath = 'admin/admin-src.js',
adminOldSrc = loadSilently(adminPath),
adminSrcDelta = getSizeDelta(adminNewSrc, adminOldSrc, true);
diff --git a/loleaflet/dist/cursors/fill.cur b/loleaflet/cursors/fill.cur
similarity index 100%
rename from loleaflet/dist/cursors/fill.cur
rename to loleaflet/cursors/fill.cur
diff --git a/loleaflet/dist/cursors/fill.png b/loleaflet/cursors/fill.png
similarity index 100%
rename from loleaflet/dist/cursors/fill.png
rename to loleaflet/cursors/fill.png
diff --git a/loleaflet/main-admin.js b/loleaflet/main-admin.js
index f1d0d4b3b..02ae99491 100644
--- a/loleaflet/main-admin.js
+++ b/loleaflet/main-admin.js
@@ -1,7 +1,7 @@
// CSS requires
require('bootstrap/dist/css/bootstrap.css');
-require('./dist/admin/bootstrap/ie10-viewport-bug-workaround.css');
-require('./dist/admin/bootstrap/dashboard.css');
+require('./admin/bootstrap/ie10-viewport-bug-workaround.css');
+require('./admin/bootstrap/dashboard.css');
require('vex-js/css/vex.css');
require('vex-js/css/vex-theme-plain.css');
@@ -24,6 +24,6 @@ global.l10nstrings = require('./admin.strings.js');
global.d3 = require('d3');
require('bootstrap/dist/js/bootstrap.js');
-require('./dist/admin/bootstrap/holder.min.js');
-require('./dist/admin/bootstrap/ie10-viewport-bug-workaround.js');
-global.Admin = require('./dist/admin/admin-src.js');
+require('./admin/bootstrap/holder.min.js');
+require('./admin/bootstrap/ie10-viewport-bug-workaround.js');
+global.Admin = require('./admin/admin-src.js');
More information about the Libreoffice-commits
mailing list