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