You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the workspace for Lowcoder Extra Components like Calendar, Image Editor, Mermaid Charts and eCharts.
4
+
5
+
## Local Development preparation
6
+
7
+
Navigate your terminal or bash to your /root folder (lowcoder repository) to install Lowcoder Extra Components dependencies and the Lowcoder SDK
8
+
9
+
To develop with the Lowcoder Extra Components after you clone the Lowcoder Repository, first make sure the Lowcoder SDK is local built.
10
+
11
+
```bash
12
+
cd client/packages/lowcoder-sdk
13
+
yarn build
14
+
```
2
15
3
16
## Start
4
17
5
-
Start dev server to develop your comp lib.
18
+
Now you can start the local dev server for Lowcoder Extra Components to develop and add your Component Plugin
6
19
7
20
```bash
21
+
cd client/packages/lowcoder-comps
8
22
yarn start
23
+
```
9
24
10
-
# or
25
+
The local dev server will build for roughly a minute and open then a Browser Window on http://localhost:9000/ with the Lowcoder Component Builder.
26
+
27
+
## Local development
28
+
29
+
After the local dev server is started, the Lowcoder Component Builder is prepared. A new browser window should open at http://localhost:9000 This is the Components Preview, which allows you to see your new component in action, as it would work in the Lowcoder Editor.
30
+
31
+
Data, methods and properties are visible and interactive, so you can test your Component during development. The view will get automatically refreshed.
32
+
33
+
The Lowcoder Component Builder makes the development & publishing of multiple individual components as bundle possible. Find the /src/comps folder in /lowcoder-comps. Here are existing components to find. It is suggested for new components to create a new folder. In the left navigation of the Components Preview you can switch between your components.
34
+
35
+
to see your component and include it in the processing on the development server, you have to do the folloiwing steps:
36
+
37
+
### modify /lowcoder-comps/package.json
38
+
39
+
```JSON
40
+
"yournewcomponent": {
41
+
"name": "Your new Component name",
42
+
"icon": "./icons/your-icon.svg",
43
+
"description": "A Component Plugin to ...",
44
+
"category": "itemHandling",
45
+
"layoutInfo": {
46
+
"w": 6,
47
+
"h": 30
48
+
}
49
+
}
50
+
```
11
51
12
-
npm start
52
+
53
+
Please choose one category out of:
54
+
55
+
- dashboards
56
+
- layout
57
+
- forms
58
+
- collaboration
59
+
- projectmanagement
60
+
- scheduling
61
+
- documents
62
+
- itemHandling
63
+
- multimedia
64
+
- integration
65
+
66
+
layoutInfo helps you to define the size (in grid-cells) of your Component in the grid for the very first moment, when a user drags your Component out of the components display on the right side in the Lowcoder Editor.
67
+
68
+
### modify /lowcoder-comps/src/index.ts
69
+
70
+
```JavaScript
71
+
Add your Component for the exported members of Lowcoder Extra Components
Now your Plugin should be visibe and displayed in the Lowcoder Component Builder at http://localhost:9000/
14
90
15
91
## Build
16
92
17
-
Build current comp lib into a .tgz file that you can upload it to the Lowcoder Comp Market.
93
+
When you finish development and all tests, you can build the Components to use it in runtime.
18
94
19
-
Before build you should change the version in package.json file.
95
+
This will build the current Component Plugins into a .tgz file that you can upload.
96
+
97
+
**Before build you should change the version in package.json file.**
20
98
21
99
```bash
22
100
yarn build
@@ -25,3 +103,18 @@ yarn build
25
103
26
104
npm run build
27
105
```
106
+
107
+
## How to publish a Component Plugin
108
+
109
+
With the following command you can publish the script to the NPM repository:
110
+
111
+
```bash
112
+
yarn build --publish
113
+
```
114
+
115
+
This command will publis the whole Lowcoder Extra Components bundle to [NPMjs](https://www.npmjs.com/)
116
+
Make sure, you updated the Version of Lowcoder Comps before in /lowcoder-comps/package.json
117
+
118
+
## Contribute your Plugin
119
+
120
+
If you wish to contribute your plugin and persist it as general Lowcoder Extra Component, please raise a PR to our /dev branch in the Lowcoder Community-Edition Repository https://github.com/lowcoder-org/lowcoder
0 commit comments