You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by hn...@apache.org on 2024/03/08 06:47:05 UTC

(myfaces-tobago) branch main updated: build(npm): cleanup

This is an automated email from the ASF dual-hosted git repository.

hnoeth pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/main by this push:
     new 4cfd36e618 build(npm): cleanup
4cfd36e618 is described below

commit 4cfd36e6185bac65b607551827cad8956a0e6c2c
Author: Henning Noeth <hn...@apache.org>
AuthorDate: Thu Mar 7 13:09:50 2024 +0100

    build(npm): cleanup
    
    We do not use "@babel/types" anymore, so the moduleResolution can be removed.
    Remove also the "tobago-theme-standard/npm/dist"-exclusion, because the path did not exist anymore.
    Cleanup imports in tobago-all.ts (now tobago-init.ts). There should only imports for custom elements and tobago-polyfill.
    Rename tobago-all (which doesn't import ALL TS) into tobago-init, because this is the entry point for all TypeScripts and the tobago.init event is dispatched here.
---
 tobago-theme/rollup.config.mjs                              |  2 +-
 .../src/main/ts/{tobago-all.ts => tobago-init.ts}           | 13 +++++++------
 tobago-theme/tsconfig.json                                  | 13 +++----------
 3 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/tobago-theme/rollup.config.mjs b/tobago-theme/rollup.config.mjs
index 5ffdb09f8f..f6487605e6 100644
--- a/tobago-theme/rollup.config.mjs
+++ b/tobago-theme/rollup.config.mjs
@@ -22,7 +22,7 @@ import terser from "@rollup/plugin-terser";
 import commonjs from "@rollup/plugin-commonjs";
 
 export default {
-  input: 'tobago-theme-standard/src/main/ts/tobago-all.ts',
+  input: 'tobago-theme-standard/src/main/ts/tobago-init.ts',
   output: [
     {
       file: 'tobago-theme-standard/src/main/js/tobago.js',
diff --git a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-all.ts b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-init.ts
similarity index 95%
rename from tobago-theme/tobago-theme-standard/src/main/ts/tobago-all.ts
rename to tobago-theme/tobago-theme-standard/src/main/ts/tobago-init.ts
index f303c49048..201265ce41 100644
--- a/tobago-theme/tobago-theme-standard/src/main/ts/tobago-all.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/ts/tobago-init.ts
@@ -15,20 +15,19 @@
  * limitations under the License.
  */
 
+// custom elements
 import "./tobago-bar";
 import "./tobago-behavior";
-import "./tobago-behavior-mode";
-import "./tobago-collapsible-operation";
-import "./tobago-dropdown";
 import "./tobago-date";
+import "./tobago-dropdown";
 import "./tobago-file";
 import "./tobago-focus";
 import "./tobago-footer";
 import "./tobago-in";
 import "./tobago-messages";
 import "./tobago-overlay";
+import "./tobago-page";
 import "./tobago-panel";
-import "./tobago-polyfill";
 import "./tobago-popover";
 import "./tobago-popup";
 import "./tobago-range";
@@ -36,8 +35,8 @@ import "./tobago-reload";
 import "./tobago-scroll";
 import "./tobago-select-boolean-checkbox";
 import "./tobago-select-boolean-toggle";
-import "./tobago-select-many-list";
 import "./tobago-select-many-checkbox";
+import "./tobago-select-many-list";
 import "./tobago-select-many-listbox";
 import "./tobago-select-many-shuttle";
 import "./tobago-select-one-choice";
@@ -47,7 +46,6 @@ import "./tobago-select-one-radio";
 import "./tobago-sheet";
 import "./tobago-split-layout";
 import "./tobago-stars";
-import "./tobago-suggest";
 import "./tobago-tab";
 import "./tobago-textarea";
 import "./tobago-toasts";
@@ -56,6 +54,9 @@ import "./tobago-tree-listbox";
 import "./tobago-tree-node";
 import "./tobago-tree-select";
 
+//polyfill
+import "./tobago-polyfill";
+
 if (document.readyState === "loading") {
   document.addEventListener("DOMContentLoaded",
       (event) => {
diff --git a/tobago-theme/tsconfig.json b/tobago-theme/tsconfig.json
index d11469ee04..e2208188b3 100644
--- a/tobago-theme/tsconfig.json
+++ b/tobago-theme/tsconfig.json
@@ -9,19 +9,12 @@
     "sourceMap": true,
     "inlineSources": true,
     "removeComments": false,
-    "noEmitOnError": true,
-    "moduleResolution": "node",
-    "esModuleInterop": true
+    "noEmitOnError": true
   },
   "include": [
-//    "tobago-theme-standard/src/main/ts/tobago-all.ts",
-//    "tobago-theme-standard/src/main/ts/faces.d.ts",
     "tobago-theme-standard/src/main/ts/*.ts"
   ],
   "exclude": [
-    "node_modules",
-    "node",
-    "tobago-theme-standard/npm/dist"
-  ],
-  "_comment for moduleResolution": "this is to fix a compiler problem with @babel/types, see: https://github.com/microsoft/TypeScript/issues/11103"
+    "node_modules"
+  ]
 }