Skip to content

Commit 7926158

Browse files
committed
Readme updated
1 parent 87c461a commit 7926158

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

formsflow-custom-formio/README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
1-
### formsflow-formio-custom-elements
1+
# formsflow-formio-custom-elements
22

33
This is a collection of custom FORMIO components and templates for Formsflow.ai project.
4+
5+
## Build
6+
7+
1) To create Build with all dependencies
8+
9+
```
10+
npm run build
11+
```
12+
Output file name : `customformio.js`
13+
14+
2) To create build by excluding form-io dependencies so that it can resolve it from consumer application.
15+
16+
```
17+
npm run buildExcludeFormio
18+
```
19+
Output file name : `customformio-ex.js`
20+
### Consumer projects
21+
22+
## Formsflow.ai API in forms-flow-ai\forms-flow-api\src\formsflow_api\templates\index.html
23+
24+
Including direct js
25+
```
26+
<script src="https://unpkg.com/formsflow-formio-custom-elements/dist/customformio.js"></script>
27+
```
28+
29+
## Formsflow.ai WEB in forms-flow-ai\forms-flow-web\src\index.js
30+
```
31+
npm install formsflow-formio-custom-elements --save
32+
```
33+
34+
```Javascript
35+
import { Components } from "react-formio";
36+
37+
// Set custom formio elements - Code splitted
38+
import("formsflow-formio-custom-elements/dist/customformio-ex").then(
39+
(FormioCustomEx) => {
40+
Components.setComponents(FormioCustomEx.components);
41+
}
42+
);
43+
```

0 commit comments

Comments
 (0)