From 8658f495c60f924565d60c2fad85172cfc71590c Mon Sep 17 00:00:00 2001 From: ghiscoding Date: Tue, 3 Feb 2026 00:20:21 -0500 Subject: [PATCH] feat!: drop standalone legacy browser ``` @@ -110,6 +105,17 @@ The project now has only 1 small dependency which is [fflate](https://github.com This modernization provides a huge decrease in the final build size, with only 1 dependency, and also offers better performance 🚀 +## Major Changes + +### version 3.0 +- initial release (forked from original `excel-builder` library) + +### version 4.0 +- build as ESM-Only and drop CJS (CommonJS) build (aka `require()`) + +### version 5.0 +- drop the legacy IIFE build and the use of `window` object (typically used when loading as the legacy ` ``` diff --git a/packages/demo/src/examples/example-standalone-iife.html b/packages/demo/src/examples/example-standalone-iife.html deleted file mode 100644 index 6fe3c53..0000000 --- a/packages/demo/src/examples/example-standalone-iife.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - Standalone example 1: Basic Grid - - - -

Excel-Builder-Vanilla

-
Standalone JS (IIFE)
- -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArtistAlbum (hidden column)Price
BucketheadAlbino Slug8.99
BucketheadElectric Tears13.99
BucketheadColma11.34
Crystal MethodVegas10.54
Crystal MethodTweekend10.64
Crystal MethodDivided By Night8.99
-
-
-
- - - - - - - - diff --git a/packages/demo/src/getting-started.html b/packages/demo/src/getting-started.html index 1ac0989..4459d4a 100644 --- a/packages/demo/src/getting-started.html +++ b/packages/demo/src/getting-started.html @@ -19,29 +19,15 @@
CDN
jsDelivr graciously provide CDNs for many JavaScript libraries including Excel-Builder-Vanilla. Just use the following CDN links.

-

- The project now ships as ESM-Only, if you still wish to use the legacy CommonJS (CJS) format with require(), then use - previous 3.x version. -

-<!-- (IIFE Standalone Script) Latest compiled and minified JavaScript -->
-<script type="module" src="https://cdn.jsdelivr.net/npm/excel-builder-vanilla@4.0.0/dist/excel-builder.iife.js"></script>
+<script type="module">
+  // ESM Module import
+  import excelBuilderVanilla from 'https://cdn.jsdelivr.net/npm/excel-builder-vanilla@5.0.0/+esm';
+</script>
+
- - - Note: the excel-builder.iife.js is the only dist bundle providing the ExcelBuilder on the - window object. - -
-
- - You can find a Standalone Script (IIFE) example at the location - examples/example-standalone-iife.html -
@@ -59,16 +45,19 @@

The library provides both CommonJS or ESM, see the example below:

-// CommonJS
-const { createWorkbook, Workbook } = require('excel-builder-vanilla');
-
 // ESM
-import { createWorkbook } from 'excel-builder-vanilla';
+import { createWorkbook } from 'excel-builder-vanilla';
 
 // use it
-const artistWorkbook = createWorkbook(); // or new Workbook();
-const albumList = artistWorkbook.createWorksheet({ name: 'Artists' });
-albumList.setData(this.originalData);
+const artistWorkbook = createWorksheet(); // or new Workbook();
+const albumList = artistWorkbook.createWorksheet({ name: 'Artists' });
+albumList.setData(this.originalData);
 
+ +
Legacy Versions
+

+ The project now ships as ESM-Only, if you still wish to use the legacy <script> standalone IIFE Script on the + window object, then use the previous 4.x version. +

diff --git a/packages/excel-builder-vanilla/README.md b/packages/excel-builder-vanilla/README.md index 89971f9..b3475d9 100644 --- a/packages/excel-builder-vanilla/README.md +++ b/packages/excel-builder-vanilla/README.md @@ -14,22 +14,12 @@ Available [**Live demo**](https://ghiscoding.github.io/excel-builder-vanilla/) w npm install excel-builder-vanilla ``` -The project offers 2 different bundle types, choose the best one depending on your use case: -1. ESM: to `import from` (preferred) -2. IIFE: standalone script with `ExcelBuilder` available on the `window` object - -> [!NOTE] -> ESM import is the preferred approach and IIFE might actually be removed in the future to lower download size even further. +The project only offers 1 bundle type +- ESM: to `import from` (preferred) ```ts // ESM - npm install import { createWorksheet } from 'excel-builder-vanilla'; - -// IIFE - CDN - - ``` ### Basic Usage @@ -58,3 +48,14 @@ downloadExcelFile(artistWorkbook, 'Artist WB.xlsx'); ## LICENSE [MIT License](https://github.com/ghiscoding/excel-builder-vanilla/blob/main/LICENSE.md) + +## Major Changes + +### version 3.0 +- initial release (forked from original `excel-builder` library) + +### version 4.0 +- build as ESM-Only and drop CJS (CommonJS) build (aka `require()`) + +### version 5.0 +- drop the legacy IIFE build and the use of `window` object (typically used when loading as the legacy `