From 7f8a1b64bd68e062af58f0f752ba01781e531256 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 18 May 2020 10:08:28 -0600 Subject: [PATCH] Update usage of copy-webpack-plugin --- examples/webpack/config.js | 16 +++++++++------- package.json | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/examples/webpack/config.js b/examples/webpack/config.js index e6e7bc7a80..f1e7012195 100644 --- a/examples/webpack/config.js +++ b/examples/webpack/config.js @@ -64,13 +64,15 @@ module.exports = { templates: path.join(__dirname, '..', 'templates'), common: 'common', }), - new CopyPlugin([ - {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'}, - ]), + new CopyPlugin({ + patterns: [ + {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'}, + ], + }), ], devtool: 'source-map', output: { diff --git a/package.json b/package.json index 7f50f58a51..44ba794613 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "build-package": "npm run transpile && npm run copy-css && node tasks/prepare-package && shx cp README.md build/ol", "build-index": "npm run build-package && node tasks/generate-index", "build-legacy": "shx rm -rf build && npm run build-index && webpack --config config/webpack-config-legacy-build.js && cleancss --source-map src/ol/ol.css -o build/legacy/ol.css", - "build-site": "npm run build-examples && npm run apidoc && mkdir build/site && cp site/index.html build/site && mv build/apidoc build/site/apidoc && mv build/examples build/site/examples", + "build-site": "npm run build-examples && npm run apidoc && mkdir -p build/site && cp site/index.html build/site && mv build/apidoc build/site/apidoc && mv build/examples build/site/examples", "copy-css": "shx cp src/ol/ol.css build/ol/ol.css", "transpile": "shx rm -rf build/ol && shx mkdir -p build/ol && shx cp -rf src/ol build/ol/src && node tasks/serialize-workers && tsc --project config/tsconfig-build.json", "typecheck": "tsc --pretty",