From 64e895b1aecefa9192a80711dd421fe4a5f0797c Mon Sep 17 00:00:00 2001 From: "Ghislain B." Date: Sat, 5 Oct 2024 01:56:37 -0400 Subject: [PATCH] fix: avoid barrel files, keep only 1 entry file (#304) --- .../multiple-select-vanilla/build-prod.mjs | 3 ++ .../src/MultipleSelectInstance.ts | 10 +++-- .../multiple-select-vanilla/src/constants.ts | 3 +- packages/multiple-select-vanilla/src/index.ts | 42 ++++++++++++++++--- .../src/interfaces/index.ts | 3 -- .../src/locales/multiple-select-cz-CS.ts | 2 +- .../src/locales/multiple-select-da-DK.ts | 2 +- .../src/locales/multiple-select-de-DE.ts | 2 +- .../src/locales/multiple-select-en-US.ts | 2 +- .../src/locales/multiple-select-es-ES.ts | 2 +- .../src/locales/multiple-select-fr-FR.ts | 2 +- .../src/locales/multiple-select-hu-HU.ts | 2 +- .../src/locales/multiple-select-it-IT.ts | 2 +- .../src/locales/multiple-select-ja-JP.ts | 2 +- .../src/locales/multiple-select-pt-BR.ts | 2 +- .../src/locales/multiple-select-ru-RU.ts | 2 +- .../src/locales/multiple-select-vi-VN.ts | 2 +- .../src/locales/multiple-select-zh-CN.ts | 2 +- .../src/locales/multiple-select-zh-TW.ts | 2 +- .../src/{interfaces => models}/interfaces.ts | 0 .../locale.interface.ts | 0 .../multipleSelectOption.interface.ts | 0 .../src/multiple-select.ts | 4 +- .../src/services/index.ts | 2 - .../src/services/virtual-scroll.ts | 4 +- .../src/utils/domUtils.ts | 2 +- .../src/utils/index.ts | 2 - .../multiple-select-vanilla/tsup.config.ts | 28 ++++++------- 28 files changed, 80 insertions(+), 51 deletions(-) delete mode 100644 packages/multiple-select-vanilla/src/interfaces/index.ts rename packages/multiple-select-vanilla/src/{interfaces => models}/interfaces.ts (100%) rename packages/multiple-select-vanilla/src/{interfaces => models}/locale.interface.ts (100%) rename packages/multiple-select-vanilla/src/{interfaces => models}/multipleSelectOption.interface.ts (100%) delete mode 100644 packages/multiple-select-vanilla/src/services/index.ts delete mode 100644 packages/multiple-select-vanilla/src/utils/index.ts diff --git a/packages/multiple-select-vanilla/build-prod.mjs b/packages/multiple-select-vanilla/build-prod.mjs index e88edcff6..cccecbc7f 100644 --- a/packages/multiple-select-vanilla/build-prod.mjs +++ b/packages/multiple-select-vanilla/build-prod.mjs @@ -37,13 +37,16 @@ for (const format of buildFormats) { outfile: `dist/locales/multiple-select-all-locales.${extension}`, }); + // - let's use TSUP to get valid hybrid (CJS/ESM) approach with are-the-types-wrong, however keep the rest of the build // finally, create a regular bundle as a standalone which will be accessible as MultipleSelect from the global window object // this file is basically a legacy alternative to import via a