From 85ea74a38370fb3eb57850d6175742059f5ca289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Wed, 14 Apr 2021 22:24:52 +0200 Subject: [PATCH] Fix building of examples with latest copy-webpack-plugin --- .eslintignore | 1 - examples/index.html | 2 +- examples/{ => resources}/Jugl.js | 0 examples/webpack/config.js | 1 - examples/webpack/example-builder.js | 4 ++-- 5 files changed, 3 insertions(+), 5 deletions(-) rename examples/{ => resources}/Jugl.js (100%) diff --git a/.eslintignore b/.eslintignore index dcc754f246..2089ca0bcf 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,3 @@ -examples/Jugl.js examples/resources/ build/package/**/*webgl* config/jsdoc/api/template/static/scripts/ \ No newline at end of file diff --git a/examples/index.html b/examples/index.html index be31b4b36f..70d4759308 100644 --- a/examples/index.html +++ b/examples/index.html @@ -29,7 +29,7 @@ background-color: #F5F5F5; } - + diff --git a/examples/Jugl.js b/examples/resources/Jugl.js similarity index 100% rename from examples/Jugl.js rename to examples/resources/Jugl.js diff --git a/examples/webpack/config.js b/examples/webpack/config.js index 365819c3e8..b638ce019b 100644 --- a/examples/webpack/config.js +++ b/examples/webpack/config.js @@ -85,7 +85,6 @@ module.exports = { {from: '../src/ol/ol.css', to: 'css'}, {from: 'data', to: 'data'}, {from: 'resources', to: 'resources'}, - {from: 'Jugl.js', to: 'Jugl.js'}, {from: 'index.html', to: 'index.html'}, {from: 'index.js', to: 'index.js'}, ], diff --git a/examples/webpack/example-builder.js b/examples/webpack/example-builder.js index 4b4dee1f34..c41334f606 100644 --- a/examples/webpack/example-builder.js +++ b/examples/webpack/example-builder.js @@ -166,7 +166,7 @@ class ExampleBuilder { } async addAssets(assets, dir) { - const jsAssetRE = new RegExp(/^(\w|-)+\.js$/); + const jsAssetRE = /^[\w-]+\.js$/; const names = []; for (const filename in assets) { if (!jsAssetRE.test(filename)) { @@ -174,7 +174,7 @@ class ExampleBuilder { } const name = filename.replace(/\.js$/, ''); - if (name === this.common) { + if (name === 'index' || name === this.common) { continue; }