Skip to content

Commit

Permalink
Fix building of examples with latest copy-webpack-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonE committed Apr 14, 2021
1 parent e9efe2e commit 85ea74a
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion .eslintignore
@@ -1,4 +1,3 @@
examples/Jugl.js
examples/resources/
build/package/**/*webgl*
config/jsdoc/api/template/static/scripts/
2 changes: 1 addition & 1 deletion examples/index.html
Expand Up @@ -29,7 +29,7 @@
background-color: #F5F5F5;
}
</style>
<script type="text/javascript" src="Jugl.js"></script>
<script type="text/javascript" src="resources/Jugl.js"></script>
<script type="text/javascript" src="examples-info.js"></script>
<script type="text/javascript" src="index.js"></script>

Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion examples/webpack/config.js
Expand Up @@ -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'},
],
Expand Down
4 changes: 2 additions & 2 deletions examples/webpack/example-builder.js
Expand Up @@ -166,15 +166,15 @@ 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)) {
continue;
}

const name = filename.replace(/\.js$/, '');
if (name === this.common) {
if (name === 'index' || name === this.common) {
continue;
}

Expand Down

0 comments on commit 85ea74a

Please sign in to comment.