This is an automated email from the ASF dual-hosted git repository.
tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git
The following commit(s) were added to refs/heads/main by this push:
new cf267bff841 kie-issues#424: Add form-generation-tool 'bin' entry point
(#2123)
cf267bff841 is described below
commit cf267bff8419268dad5fb46241b84dd5c3c77de1
Author: Jozef Marko <[email protected]>
AuthorDate: Thu Jan 18 17:03:29 2024 +0100
kie-issues#424: Add form-generation-tool 'bin' entry point (#2123)
---
packages/form-generation-tool/README.md | 17 +++++++++++++++--
packages/form-generation-tool/bin.js | 24 ++++++++++++++++++++++++
packages/form-generation-tool/package.json | 3 +++
3 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/packages/form-generation-tool/README.md
b/packages/form-generation-tool/README.md
index 6e8b7ce5e1e..c3097d520d1 100644
--- a/packages/form-generation-tool/README.md
+++ b/packages/form-generation-tool/README.md
@@ -30,13 +30,26 @@ After the command has finished, go to
`packages/form-generation-tool/dist` folde
## Running the CLI
-In the command line just execute the CLI binary:
+If you built the `form-generation-tool` package as described above locally,
then in the command line just execute the CLI binary:
```shell script
./form-generation-cli-linux
```
-This command will start a wizard to help you generate the forms:
+For those, who do not want to build `form-generation-tool` package locally,
they can install last published version and then run it:
+
+```shell script
+npm i -g @kie-tools/form-generation-tool
+form-generation-tool
+```
+
+For those, who want to try `form-generation-tool` without instalation they can
start it as:
+
+```shell script
+npx @kie-tools/form-generation-tool
+```
+
+All commands will start a wizard to help you generate the forms:
1. First set the path to your Kogito Project.
diff --git a/packages/form-generation-tool/bin.js
b/packages/form-generation-tool/bin.js
new file mode 100755
index 00000000000..1428f160016
--- /dev/null
+++ b/packages/form-generation-tool/bin.js
@@ -0,0 +1,24 @@
+#! /usr/bin/env node
+/*
+ * 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.
+ */
+
+/**
+ * This file is used as entry point of the form-generation-tool cli command
+ */
+require("./dist/index");
diff --git a/packages/form-generation-tool/package.json
b/packages/form-generation-tool/package.json
index 8d89b47048c..9cd2e18650f 100644
--- a/packages/form-generation-tool/package.json
+++ b/packages/form-generation-tool/package.json
@@ -12,6 +12,9 @@
"bugs": {
"url": "https://github.com/apache/incubator-kie-tools/issues"
},
+ "bin": {
+ "form-generation-tool": "bin.js"
+ },
"types": "./dist/index.d.ts",
"main": "dist/index.js",
"files": [
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]