WIP: ES6 module conversion and webpack refactoring

- Convert all IIFE modules to ES6 modules with attach functions
- Split webpack configs: lib build vs demo build
- Add UMD wrapper for auto-initialization with jQuery
- Update package.json with sequential build scripts
- Clean up legacy dist files and reorganize demo structure

Status: jQuery timing issues remain - attach functions not accessible
Next: Debug UMD factory execution and jQuery parameter passing
This commit is contained in:
Micha
2025-07-31 14:38:37 +02:00
parent 09358eaaf6
commit 196db8febb
43 changed files with 2044 additions and 5679 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -1,7 +1,9 @@
import $ from 'jquery';
// Ensure jQuery is available globally before any other imports
// Ensure jQuery is available globally before importing x-editable
window.$ = window.jQuery = $;
global.$ = global.jQuery = $;
if (typeof global !== 'undefined') {
global.$ = global.jQuery = $;
}
import "bootstrap"
import "bootstrap/dist/css/bootstrap.min.css"
@@ -11,15 +13,15 @@ import "bootstrap-icons/font/bootstrap-icons.min.css"
import "bootstrap-datepicker";
import "bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css";
// Import the editable functionality (attaches to jQuery.fn) - using built distribution
// When using built files, you need to include select2 separately for select2 inputs
// Import select2 before x-editable
import "select2";
import "select2/dist/css/select2.min.css";
import '../dist/bootstrap5-editable/js/bootstrap-editable.min.js'
import '../dist/bootstrap5-editable/css/bootstrap-editable.css'
$.fn.editable.defaults.mode = 'inline';
// Import the editable functionality - should be synchronous
import 'dist/bootstrap5-editable/js/bootstrap-editable.js'
import 'dist/bootstrap5-editable/css/bootstrap-editable.css'
// $.fn.editable.defaults.mode = 'inline';
$(function() {

BIN
demo/dist/240c0c6464de0b4bf116.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

BIN
demo/dist/56d4c7ce2d3591a02107.gif vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

1307
demo/dist/app.js vendored Normal file

File diff suppressed because one or more lines are too long

BIN
demo/dist/fonts/bootstrap-icons.woff vendored Normal file

Binary file not shown.

BIN
demo/dist/fonts/bootstrap-icons.woff2 vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -7,7 +7,7 @@
<link rel="stylesheet" href="./dist/bootstrap5-editable/css/bootstrap-editable.css">
<!-- <script src="./dist/bootstrap5-editable/js/bootstrap-editable.js"></script>-->
<!-- <script src="./dist/jquery.js"></script>-->
<script src="./dist/app.js" type="module"></script>
<script src="./demo/dist/app.js" type="module"></script>
<title>Bootstrap 5.3.3 Test</title>
</head>