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
5. After dev server starts successfully, it will be automatically opened in the default browser.
39
53
40
54
### Before submitting a pull request
41
55
42
56
In addition, before submitting a pull request, please make sure the following is done:
43
57
44
58
1. If you’ve fixed a bug or added code that should be tested and add unit test suite.
45
-
2. Run `yarn test` and ensure all test suites pass.
46
-
3. If you add new dependency, use yarn workspace lowcoder some-package to make sure yarn.lock is also updated.
59
+
2. Run test and ensure all test suites pass.
60
+
61
+
```bash
62
+
yarn test
63
+
```
64
+
65
+
3. If you add new dependency, use the yarn worspace tool to make sure yarn.lock is also updated.
66
+
67
+
```bash
68
+
yarn workspace lowcoder <package name>
69
+
```
70
+
71
+
### Developing and publishung UI components for Lowcoder
72
+
73
+
1. Initialization
74
+
75
+
Project initiation
76
+
77
+
```bash
78
+
yarn create Lowcoder-plugin <your plugin name>
79
+
```
80
+
81
+
Go to the project root
82
+
83
+
```bash
84
+
cd my-plugin
85
+
```
86
+
87
+
Start the development environment
88
+
89
+
```bash
90
+
yarn start
91
+
```
92
+
93
+
After executing yarn start, the browser is automatically opened and you enter the component development environment.
94
+
Please find more information in our [docs](https://docs.lowcoder.cloud/lowcoder-documentation/lowcoder-extension/develop-ui-components-for-apps)
95
+
96
+
2. Export components
97
+
98
+
To export all the components, use src/index.ts, for example:
99
+
100
+
```bash
101
+
import HelloWorldComp from "./HelloWorldComp";
102
+
103
+
export default {
104
+
hello_world: HelloWorldComp,
105
+
};
106
+
```
107
+
108
+
import HelloWorldComp from "./HelloWorldComp";
109
+
110
+
3. Publish plugins
111
+
112
+
When you finish developing and testing the plugin, you can publish it into the npm registry. Login in to the npm registry locally, and then execute the following command:
113
+
114
+
```bash
115
+
yarn build --publish
116
+
```
117
+
118
+
You can check a code demo here: [Code Demo on Github](https://github.com/lowcoder-org/lowcoder/tree/main/client/packages/lowcoder-plugin-demo)
0 commit comments