From 545b26e105a9d350ec781196b5d7522229cd4d95 Mon Sep 17 00:00:00 2001 From: Konstantsin Kryulenia Date: Thu, 1 Feb 2024 14:21:41 +0200 Subject: [PATCH] copy example image to public folder --- frontend/apps/remark42/package.json | 1 + frontend/apps/remark42/webpack.config.js | 9 +++ frontend/pnpm-lock.yaml | 81 ++++++++++++++++++++++++ 3 files changed, 91 insertions(+) diff --git a/frontend/apps/remark42/package.json b/frontend/apps/remark42/package.json index c96ede8d0c..461079a580 100644 --- a/frontend/apps/remark42/package.json +++ b/frontend/apps/remark42/package.json @@ -76,6 +76,7 @@ "babel-plugin-jsx-remove-data-test-id": "^3.0.0", "clean-webpack-plugin": "^4.0.0", "codecov": "^3.8.3", + "copy-webpack-plugin": "^12.0.2", "cross-env": "^7.0.3", "css-loader": "^6.7.1", "css-minimizer-webpack-plugin": "^4.0.0", diff --git a/frontend/apps/remark42/webpack.config.js b/frontend/apps/remark42/webpack.config.js index 8c85f1aeae..482250a311 100644 --- a/frontend/apps/remark42/webpack.config.js +++ b/frontend/apps/remark42/webpack.config.js @@ -5,6 +5,7 @@ const webpack = require('webpack'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); +const CopyPlugin = require('copy-webpack-plugin'); const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); const RefreshPlugin = require('@prefresh/webpack'); @@ -294,6 +295,14 @@ module.exports = (_, { mode, analyze }) => { }, plugins: [ ...plugins, + new CopyPlugin({ + patterns: [ + { + from: path.resolve(__dirname, 'templates/400x400.jpeg'), + to: PUBLIC_FOLDER_PATH, + }, + ], + }), new ForkTsCheckerWebpackPlugin(), new HtmlWebpackPlugin({ template: path.resolve(__dirname, 'templates/iframe.ejs'), diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 0a12869724..da90399566 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -51,6 +51,7 @@ importers: clean-webpack-plugin: ^4.0.0 clsx: ^1.1.1 codecov: ^3.8.3 + copy-webpack-plugin: ^12.0.2 core-js: ^3.23.3 cross-env: ^7.0.3 css-loader: ^6.7.1 @@ -163,6 +164,7 @@ importers: babel-plugin-jsx-remove-data-test-id: 3.0.0_@babel+core@7.18.6 clean-webpack-plugin: 4.0.0_webpack@5.73.0 codecov: 3.8.3 + copy-webpack-plugin: 12.0.2_webpack@5.73.0 cross-env: 7.0.3 css-loader: 6.7.1_webpack@5.73.0 css-minimizer-webpack-plugin: 4.0.0_webpack@5.73.0 @@ -2427,6 +2429,11 @@ packages: resolution: {integrity: sha512-kVaO5aEFZb33nPMTZBxiPEkY+slxiPtqC7QX8f9B3eGOMBvEfuMfxp9DSTTCsRJPumPKjrge4yagyssO4q6qzQ==} dev: true + /@sindresorhus/merge-streams/1.0.0: + resolution: {integrity: sha512-rUV5WyJrJLoloD4NDN1V1+LDMDWOa4OTsT4yYJwQNpTU6FWxkxHpL7eu4w+DmiH8x/EAM1otkPE1+LaspIbplw==} + engines: {node: '>=18'} + dev: true + /@sinonjs/commons/1.8.3: resolution: {integrity: sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==} dependencies: @@ -4566,6 +4573,21 @@ packages: engines: {node: '>= 0.6'} dev: true + /copy-webpack-plugin/12.0.2_webpack@5.73.0: + resolution: {integrity: sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==} + engines: {node: '>= 18.12.0'} + peerDependencies: + webpack: ^5.1.0 + dependencies: + fast-glob: 3.3.2 + glob-parent: 6.0.2 + globby: 14.0.0 + normalize-path: 3.0.0 + schema-utils: 4.2.0 + serialize-javascript: 6.0.2 + webpack: 5.73.0_323cogk7mrkhphrh6zdbuggp4a + dev: true + /core-js-compat/3.23.4: resolution: {integrity: sha512-RkSRPe+JYEoflcsuxJWaiMPhnZoFS51FcIxm53k4KzhISCBTmaGlto9dTIrYuk0hnJc3G6pKufAKepHnBq6B6Q==} dependencies: @@ -6102,6 +6124,17 @@ packages: micromatch: 4.0.5 dev: true + /fast-glob/3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + /fast-json-stable-stringify/2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} dev: true @@ -6464,6 +6497,18 @@ packages: slash: 3.0.0 dev: true + /globby/14.0.0: + resolution: {integrity: sha512-/1WM/LNHRAOH9lZta77uGbq0dAEQM+XjNesWwhlERDVenqothRbnzTrL3/LrIoEPPjeUHC3vrS6TwoyxeHs7MQ==} + engines: {node: '>=18'} + dependencies: + '@sindresorhus/merge-streams': 1.0.0 + fast-glob: 3.3.2 + ignore: 5.3.1 + path-type: 5.0.0 + slash: 5.1.0 + unicorn-magic: 0.1.0 + dev: true + /globby/6.1.0: resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==} engines: {node: '>=0.10.0'} @@ -6806,6 +6851,11 @@ packages: engines: {node: '>= 4'} dev: true + /ignore/5.3.1: + resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + engines: {node: '>= 4'} + dev: true + /import-fresh/3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -8959,6 +9009,11 @@ packages: engines: {node: '>=8'} dev: true + /path-type/5.0.0: + resolution: {integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==} + engines: {node: '>=12'} + dev: true + /pathval/1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} dev: true @@ -10329,6 +10384,16 @@ packages: ajv-keywords: 5.1.0_ajv@8.11.0 dev: true + /schema-utils/4.2.0: + resolution: {integrity: sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==} + engines: {node: '>= 12.13.0'} + dependencies: + '@types/json-schema': 7.0.11 + ajv: 8.11.0 + ajv-formats: 2.1.1 + ajv-keywords: 5.1.0_ajv@8.11.0 + dev: true + /select-hose/2.0.0: resolution: {integrity: sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==} dev: true @@ -10398,6 +10463,12 @@ packages: randombytes: 2.1.0 dev: true + /serialize-javascript/6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + dependencies: + randombytes: 2.1.0 + dev: true + /serve-index/1.9.1: resolution: {integrity: sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==} engines: {node: '>= 0.8.0'} @@ -10517,6 +10588,11 @@ packages: engines: {node: '>=8'} dev: true + /slash/5.1.0: + resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} + engines: {node: '>=14.16'} + dev: true + /slice-ansi/3.0.0: resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} engines: {node: '>=8'} @@ -11523,6 +11599,11 @@ packages: engines: {node: '>=4'} dev: true + /unicorn-magic/0.1.0: + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} + dev: true + /universalify/0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'}