Skip to content

Commit 09d0921

Browse files
authored
Optimized OpenLayers build (#27)
* WIP optimized OpenLayers build * custom build using modified tasks/generate-info.js from openlayers * bump version
1 parent 97ebf25 commit 09d0921

29 files changed

+107
-38
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/.idea/
2+
ol6/openlayers/

composer.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "mprins/dokuwiki-plugin-openlayersmap",
3+
"description": "Provides a syntax for rendering an OpenLayers based map in a wiki page.",
4+
"homepage": "https://www.dokuwiki.org/plugin:openlayersmap",
5+
"minimum-stability": "stable",
6+
"license": "bsd-2-clause",
7+
"type": "plugin",
8+
"authors": [
9+
{
10+
"name": "Mark C. Prins",
11+
"email": "[email protected]"
12+
}
13+
],
14+
"require": {
15+
"php": ">=7.4"
16+
},
17+
"config": {
18+
"platform": {
19+
"php": "8.0"
20+
}
21+
}
22+
}

deleted.files

+21-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,24 @@ scss/_tooltip.scss
4545
scss/print.scss
4646
scss/style.scss
4747
.github/workflows/build.yml
48-
LICENSE.txt
48+
LICENSE.txt
49+
ol6/226.ol.js
50+
ol6/226.ol.js.map
51+
ol6/231.ol.js
52+
ol6/231.ol.js.map
53+
ol6/247.ol.js
54+
ol6/247.ol.js.LICENSE.txt
55+
ol6/247.ol.js.map
56+
ol6/356.ol.js
57+
ol6/356.ol.js.map
58+
ol6/382.ol.js
59+
ol6/382.ol.js.map
60+
ol6/395.ol.js
61+
ol6/395.ol.js.map
62+
ol6/54.ol.js
63+
ol6/54.ol.js.LICENSE.txt
64+
ol6/54.ol.js.map
65+
ol6/611.ol.js
66+
ol6/611.ol.js.map
67+
ol6/629.ol.js
68+
ol6/629.ol.js.map
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
From 6b27144de1c2b5982b6f219ea2a364db845a00ea Mon Sep 17 00:00:00 2001
2+
From: Mark Prins <[email protected]>
3+
Date: Mon, 4 Jul 2022 18:26:59 +0200
4+
Subject: [PATCH] Exclude some files from the build
5+
6+
---
7+
tasks/generate-info.js | 22 +++++++++++++++++++---
8+
1 file changed, 19 insertions(+), 3 deletions(-)
9+
10+
diff --git a/tasks/generate-info.js b/tasks/generate-info.js
11+
index bcf89bedc..19c165782 100644
12+
--- a/tasks/generate-info.js
13+
+++ b/tasks/generate-info.js
14+
@@ -69,9 +69,25 @@ function getPaths() {
15+
const walker = walk(sourceDir);
16+
walker.on('file', (root, stats, next) => {
17+
const sourcePath = path.join(root, stats.name);
18+
- if (/\.js$/.test(sourcePath)) {
19+
- paths.push(sourcePath);
20+
- }
21+
+ if (
22+
+ sourcePath.toLowerCase().includes('webgl') ||
23+
+ sourcePath.toLowerCase().includes('geotiff') ||
24+
+ sourcePath.toLowerCase().includes('gml') ||
25+
+ sourcePath.toLowerCase().includes('format/filter') ||
26+
+ sourcePath.toLowerCase().includes('format/xml') ||
27+
+ sourcePath.toLowerCase().includes('capabilities') ||
28+
+ sourcePath.toLowerCase().includes('format/wk') ||
29+
+ sourcePath.toLowerCase().includes('iiif') ||
30+
+ sourcePath.toLowerCase().includes('vectortile') ||
31+
+ sourcePath.toLowerCase().includes('mapguide') ||
32+
+ sourcePath.toLowerCase().includes('cartodb') ||
33+
+ sourcePath.toLowerCase().includes('zommify') ||
34+
+ sourcePath.toLowerCase().includes('mapbox')
35+
+ ) {
36+
+ // skip
37+
+ } else {
38+
+ paths.push(sourcePath);
39+
+ }
40+
next();
41+
});
42+
walker.on('errors', () => {
43+
--
44+
2.34.1
45+

ol6/226.ol.js

-2
This file was deleted.

ol6/226.ol.js.map

-1
This file was deleted.

ol6/231.ol.js

-2
This file was deleted.

ol6/231.ol.js.map

-1
This file was deleted.

ol6/247.ol.js

-3
This file was deleted.

ol6/247.ol.js.LICENSE.txt

-1
This file was deleted.

ol6/247.ol.js.map

-1
This file was deleted.

ol6/356.ol.js

-2
This file was deleted.

ol6/356.ol.js.map

-1
This file was deleted.

0 commit comments

Comments
 (0)