You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2022/03/04 09:40:33 UTC

[myfaces-tobago] branch master updated (bc93d0d -> 81cc5d9)

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

lofwyr pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git.


    from bc93d0d  build(deps): bump actions/checkout from 2.4.0 to 3
     new 254c0ae  fix: extra JSF call in Safari
     new 81cc5d9  style: fix rat check

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 tobago-theme/copy-jsf-js.js                        | 49 ++++++++++++++++++++++
 tobago-theme/package.json                          |  2 +-
 .../tobago-theme-standard/src/main/js/jsf.js       |  3 +-
 3 files changed, 51 insertions(+), 3 deletions(-)
 create mode 100644 tobago-theme/copy-jsf-js.js

[myfaces-tobago] 02/02: style: fix rat check

Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 81cc5d9a40259f234d8f326251b0abfc5bf4caf5
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Fri Mar 4 10:25:09 2022 +0100

    style: fix rat check
---
 tobago-theme/copy-jsf-js.js | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/tobago-theme/copy-jsf-js.js b/tobago-theme/copy-jsf-js.js
index f2d74ae..1a881ec 100644
--- a/tobago-theme/copy-jsf-js.js
+++ b/tobago-theme/copy-jsf-js.js
@@ -1,4 +1,19 @@
-console.log("mytest huhu");
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 
 const sourceDir = "node_modules/jsf.js_next_gen/dist/window/";
 const targetDir = "tobago-theme-standard/src/main/js/";

[myfaces-tobago] 01/02: fix: extra JSF call in Safari

Posted by lo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 254c0ae888fce7beefcc65d6f815a449907fd61e
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Fri Mar 4 10:16:02 2022 +0100

    fix: extra JSF call in Safari
    
    This replace is, because the last line refers to a
    sourceMappingURL which is not available in Tobago.
    In Safari, with open Development Console, we got an
    404.xhtml request otherwise (not shown in network section).
---
 tobago-theme/copy-jsf-js.js                        | 34 ++++++++++++++++++++++
 tobago-theme/package.json                          |  2 +-
 .../tobago-theme-standard/src/main/js/jsf.js       |  3 +-
 3 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/tobago-theme/copy-jsf-js.js b/tobago-theme/copy-jsf-js.js
new file mode 100644
index 0000000..f2d74ae
--- /dev/null
+++ b/tobago-theme/copy-jsf-js.js
@@ -0,0 +1,34 @@
+console.log("mytest huhu");
+
+const sourceDir = "node_modules/jsf.js_next_gen/dist/window/";
+const targetDir = "tobago-theme-standard/src/main/js/";
+const jsFile = "jsf.js";
+const mapFile = "jsf.js.map";
+
+const fs = require('fs')
+
+// copy and patch jsf.js
+fs.readFile(sourceDir + jsFile, "utf8", function (e, data) {
+  if (e) {
+    console.error(e);
+  } else {
+
+    // This replace is, because the last line refers to a sourceMappingURL which is not available in Tobago.
+    // In Safari, with open Development Console, we got an 404.xhtml request otherwise (not shown in network section).
+
+    const result = data.replace(/\n\/\/# sourceMappingURL=jsf\.js\.map\.jsf\?ln=scripts/g, "");
+
+    fs.writeFile(targetDir + jsFile, result, 'utf8', function (e) {
+      if (e) {
+        console.error(e);
+      }
+    });
+  }
+});
+
+// copy jsf.js.map
+fs.copyFile(sourceDir + mapFile, targetDir + mapFile, function (e) {
+  if (e) {
+    console.error(e);
+  }
+});
diff --git a/tobago-theme/package.json b/tobago-theme/package.json
index 24201cf..c1f3d77 100644
--- a/tobago-theme/package.json
+++ b/tobago-theme/package.json
@@ -52,7 +52,7 @@
     "bi": "npm-run-all --parallel bi-css bi-fonts",
     "bi-css": "ncp node_modules/bootstrap-icons/font/bootstrap-icons.css tobago-theme-standard/src/main/css/bootstrap-icons.css",
     "bi-fonts": "ncp node_modules/bootstrap-icons/font/fonts tobago-theme-standard/src/main/css/fonts",
-    "jsf-js": "ncp node_modules/jsf.js_next_gen/dist/window tobago-theme-standard/src/main/js --filter='.*(window|\\jsf.js|\\jsf.js.map)$'",
+    "jsf-js": "node copy-jsf-js.js",
     "ts": "npm-run-all ts-lint rollup",
     "ts-lint": "eslint 'tobago-theme-standard/src/main/ts/**/*.ts'",
     "ts-compile": "tsc --project tsconfig.development.json",
diff --git a/tobago-theme/tobago-theme-standard/src/main/js/jsf.js b/tobago-theme/tobago-theme-standard/src/main/js/jsf.js
index 92d39cb..d3448ba 100644
--- a/tobago-theme/tobago-theme-standard/src/main/js/jsf.js
+++ b/tobago-theme/tobago-theme-standard/src/main/js/jsf.js
@@ -1,3 +1,2 @@
 (()=>{var e={105:(e,t)=>{!function(){"use strict";var e={585:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototy [...]
-//# sourceMappingURL=jsf.js.map
-//# sourceMappingURL=jsf.js.map.jsf?ln=scripts
\ No newline at end of file
+//# sourceMappingURL=jsf.js.map
\ No newline at end of file