From 6baa7606fa000a3194006b16372e6bfc1f6e1f4a Mon Sep 17 00:00:00 2001 From: Christian Hoffmann <112889877+ChristianHoffmannS2@users.noreply.github.com> Date: Wed, 28 Feb 2024 11:44:51 +0100 Subject: [PATCH 1/3] dynamically inject base path (#880) --- .gitignore | 1 + package.json | 1 + packages/js-example-app/package.json | 6 +- packages/js-example-app/src/assets/index.html | 149 ------------------ .../src/{prod-assets/index.html => index.ejs} | 2 +- .../js-example-app/src/prod-assets/logo.svg | 3 - packages/js-example-app/webpack.dev.js | 1 - yarn.lock | 3 +- 8 files changed, 9 insertions(+), 157 deletions(-) delete mode 100644 packages/js-example-app/src/assets/index.html rename packages/js-example-app/src/{prod-assets/index.html => index.ejs} (98%) delete mode 100644 packages/js-example-app/src/prod-assets/logo.svg diff --git a/.gitignore b/.gitignore index 824fac011..eb0f772b3 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ storybook-static package-lock.json packages/js-example-app/dist +packages/js-example-app/src/assets/index.html .yarn/install-state.gz diff --git a/package.json b/package.json index 166f2f711..f80f22944 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,7 @@ "clean-webpack-plugin": "^4.0.0", "copy-webpack-plugin": "^11.0.0", "css-loader": "^6.7.3", + "ejs": "^3.1.9", "eslint": "^8.53.0", "eslint-webpack-plugin": "^3.2.0", "fork-ts-checker-webpack-plugin": "^7.3.0", diff --git a/packages/js-example-app/package.json b/packages/js-example-app/package.json index bd9df10c3..3b05a1cbe 100644 --- a/packages/js-example-app/package.json +++ b/packages/js-example-app/package.json @@ -5,8 +5,10 @@ "private": true, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "build": "webpack --config webpack.dev.js", - "build:prod": "webpack --config webpack.prod.js", + "build-index": "yarn run -T ejs src/index.ejs baseURL=. -o src/assets/index.html", + "build-index:prod": "yarn run -T ejs src/index.ejs baseURL=js-example-app -o src/assets/index.html", + "build": "yarn run build-index && webpack --config webpack.dev.js", + "build:prod": "yarn run build-index:prod && webpack --config webpack.prod.js", "serve": "http-server ./dist" }, "keywords": [], diff --git a/packages/js-example-app/src/assets/index.html b/packages/js-example-app/src/assets/index.html deleted file mode 100644 index 938cf8871..000000000 --- a/packages/js-example-app/src/assets/index.html +++ /dev/null @@ -1,149 +0,0 @@ - - -
- -Text Button
-Select
-Checkbox
-Text Input
-Number Input
-Textarea
-Tooltip
- -Radio Input
-Text Input
-Tab Bar
-Tab 1
-Tab 2
-Tab 3
-Tab 4
-Tab 5
-Tab 6
-Tab 7
-Tab 8
-Tab 9
-Tab 10
-Tab 11
-