[Libreoffice-commits] online.git: loleaflet/build loleaflet/Jakefile.js loleaflet/main-admin.js loleaflet/package.json
Henry Castro
hcastro at collabora.com
Sun Apr 29 22:16:33 UTC 2018
loleaflet/Jakefile.js | 2 +-
loleaflet/build/build.js | 5 +++--
loleaflet/main-admin.js | 6 +++---
loleaflet/package.json | 5 -----
4 files changed, 7 insertions(+), 11 deletions(-)
New commits:
commit 80bbab39f0d045fb2c9bbef175936458fd567d4d
Author: Henry Castro <hcastro at collabora.com>
Date: Sun Apr 29 17:26:04 2018 -0400
loleaflet: browserify-css, use the global transform option
Change-Id: I058c3befc8c89d67faf35bf3ab0142893c3b7b47
diff --git a/loleaflet/Jakefile.js b/loleaflet/Jakefile.js
index 09f98741e..3bfa14c40 100644
--- a/loleaflet/Jakefile.js
+++ b/loleaflet/Jakefile.js
@@ -19,7 +19,7 @@ var build = require('./build/build.js'),
function hint(msg, args) {
return function () {
console.log(msg);
- jake.exec('node node_modules/eslint/bin/eslint.js ' + args,
+ jake.exec('node ' + builddir + 'node_modules/eslint/bin/eslint.js ' + args,
{printStdout: true}, function () {
console.log('\tCheck passed.\n');
complete();
diff --git a/loleaflet/build/build.js b/loleaflet/build/build.js
index a610e7b0c..9ea9e9eac 100644
--- a/loleaflet/build/build.js
+++ b/loleaflet/build/build.js
@@ -139,8 +139,9 @@ function bytesToKB(bytes) {
}
function bundle(files, destFilename, debug, minify, callback) {
- var bundler = browserify(files, {debug: debug});
- bundler = bundler.transform(browserifyCss);
+ var node_paths = builddir !== '' ? [builddir + 'node_modules'] : [process.cwd() +'/node_modules']
+ var bundler = browserify(files, {debug: debug, paths:node_paths});
+ bundler = bundler.transform(browserifyCss, {global:true});
if (minify) {
console.log('uglifying');
bundler.transform({
diff --git a/loleaflet/main-admin.js b/loleaflet/main-admin.js
index fab52de1a..f1d0d4b3b 100644
--- a/loleaflet/main-admin.js
+++ b/loleaflet/main-admin.js
@@ -1,9 +1,9 @@
// CSS requires
-require('./node_modules/bootstrap/dist/css/bootstrap.css');
+require('bootstrap/dist/css/bootstrap.css');
require('./dist/admin/bootstrap/ie10-viewport-bug-workaround.css');
require('./dist/admin/bootstrap/dashboard.css');
-require('./node_modules/vex-js/css/vex.css');
-require('./node_modules/vex-js/css/vex-theme-plain.css');
+require('vex-js/css/vex.css');
+require('vex-js/css/vex-theme-plain.css');
var $ = require('jquery');
global.$ = global.jQuery = $;
diff --git a/loleaflet/package.json b/loleaflet/package.json
index 97625dc4c..d7d2ace8a 100644
--- a/loleaflet/package.json
+++ b/loleaflet/package.json
@@ -29,11 +29,6 @@
"browser": {
"loleaflet": "./dist/leaflet-src.js"
},
- "browserify": {
- "transform": [
- "browserify-css"
- ]
- },
"main": "main.js",
"style": "main.css",
"scripts": {
More information about the Libreoffice-commits
mailing list