build: implement bundling system with Rollup

Phase 1-3 Complete:
-  Installed Rollup with all required plugins
-  Created rollup.config.js for UMD, ESM, CJS builds
-  Created src/index.js entry point
-  Created src/styles.css for CSS bundling
-  Added ES6 exports to debug-system.js
-  Excluded Node.js-only html-generator.js from bundle

Build outputs:
- dist/testdrive-jsui.js (217KB UMD)
- dist/testdrive-jsui.min.js (107KB minified!)
- dist/testdrive-jsui.esm.js (199KB ES Module)
- dist/testdrive-jsui.cjs.js (199KB CommonJS)
- dist/testdrive-jsui.css (minified, all styles inlined)

All builds include source maps for debugging.
This commit is contained in:
2025-12-16 22:42:37 +01:00
parent fd12bbd34a
commit a7856f4b20
6 changed files with 3021 additions and 23 deletions

View File

@@ -37,12 +37,22 @@
"devDependencies": {
"@babel/core": "^7.23.0",
"@babel/preset-env": "^7.23.0",
"@rollup/plugin-babel": "^6.1.0",
"@rollup/plugin-commonjs": "^29.0.0",
"@rollup/plugin-node-resolve": "^16.0.3",
"@rollup/plugin-terser": "^0.4.4",
"autoprefixer": "^10.4.23",
"babel-jest": "^29.7.0",
"cssnano": "^7.1.2",
"eslint": "^8.57.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-jest": "^27.6.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0"
"jest-environment-jsdom": "^29.7.0",
"postcss": "^8.5.6",
"postcss-import": "^16.1.1",
"rollup": "^4.53.5",
"rollup-plugin-postcss": "^4.0.2"
},
"dependencies": {
"jsdom": "^23.0.0"