fantonangeli commented on code in PR #3289:
URL:
https://github.com/apache/incubator-kie-tools/pull/3289#discussion_r2367300416
##########
packages/workflow-endpoints-webapp/package.json:
##########
@@ -0,0 +1,38 @@
+{
+ "name": "@kie-tools/workflow-endpoints-webapp",
Review Comment:
If @ricardozanini also agree, I would suggest
"sonataflow-workflow-endpoints-webapp"
```suggestion
"name": "@kie-tools/sonataflow-workflow-endpoints-webapp",
```
##########
packages/workflow-endpoints-webapp/webpack.config.js:
##########
@@ -0,0 +1,69 @@
+/*
+ * 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 path = require("path");
+const CopyPlugin = require("copy-webpack-plugin");
+const { merge } = require("webpack-merge");
+const common = require("@kie-tools-core/webpack-base/webpack.common.config");
+const { env } = require("./env");
+const HtmlReplaceWebpackPlugin = require("html-replace-webpack-plugin");
+const HtmlWebpackPlugin = require("html-webpack-plugin");
+
+module.exports = async (webpackEnv) =>
+ merge(common(webpackEnv), {
+ entry: {},
+ plugins: [
+ new CopyPlugin({
+ patterns: [
+ { from: "./src/styles.css", to: "./styles.css" },
+ { from: "./static/favicon.svg", to: "./favicon.svg" },
+ ],
+ }),
+ new HtmlWebpackPlugin({
+ template: path.resolve(__dirname, "src/index.html"),
+ filename: "index.html",
+ chunks: ["app"],
+ }),
+ new HtmlReplaceWebpackPlugin([
Review Comment:
Durin my PR, I discovered `html-replace-webpack-plugin` was not really
stable and maybe it's better to use the internal functionality of
`html-webpack-plugin`.
You can follow my specific commit here:
https://github.com/kubesmarts/kie-tools/pull/157/commits/e88d17fe5df9a3cf2ba41dfd995f59626bfc3e68
##########
packages/workflow-endpoints-webapp/env/index.js:
##########
@@ -0,0 +1,56 @@
+/*
+ * 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 { varsWithName, getOrDefault, composeEnv } =
require("@kie-tools-scripts/build-env");
+
+module.exports = composeEnv([require("@kie-tools/root-env/env")], {
+ vars: varsWithName({
+ WORKFLOW_ENDPOINTS_WEBAPP_title: {
+ default: "WORKFLOW ENDPOINTS",
+ description: "Application title",
+ },
+ WORKFLOW_ENDPOINTS_WEBAPP_logo: {
+ default: "favicon.svg",
+ description: "Path to logo image",
+ },
+ WORKFLOW_ENDPOINTS_WEBAPP_docLinkHref: {
+ default: "https://sonataflow.org/serverlessworkflow/latest/index.html",
+ description: "Documentation link URL",
+ },
+ WORKFLOW_ENDPOINTS_WEBAPP_docLinkText: {
+ default: "WORKFLOW ENDPOINTS DOCS",
Review Comment:
```suggestion
default: "SonataFlow docs",
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]