Skip to content

Commit 4010b73

Browse files
author
FalkWolsky
committed
Fixes flaws in documentation
1 parent 167211d commit 4010b73

File tree

2 files changed

+79
-7
lines changed

2 files changed

+79
-7
lines changed

client/README.md

Lines changed: 78 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Simply run below command to start a backend server.
1212
docker run -d --name lowcoder -p 3000:3000 -v "$PWD/stacks:/lowcoder-stacks" lowcoderorg/lowcoder-ce
1313
```
1414

15-
For more information, view our [docs](../docs/self-hosting)
15+
For more information, view our [docs](https://docs.lowcoder.cloud/lowcoder-documentation/setup-and-run/self-hosting)
1616

1717
#### Build Docker image from source
1818

@@ -32,15 +32,87 @@ docker run -d --name lowcoder-dev -p 3000:3000 -v "$PWD/stacks:/lowcoder-stacks"
3232
### Start develop
3333

3434
1. Check out source code.
35-
2. Change to client dir in the repository root via cd client.
36-
3. Run yarn to install dependencies: .
37-
4. Start dev server: `LOWCODER_API_SERVICE_URL=http://localhost:3000 yarn start`.
35+
2. Change to **/client** dir in the source dir.
36+
37+
```bash
38+
cd client
39+
```
40+
3. Run yarn to install dependencies.
41+
42+
```bash
43+
yarn install
44+
```
45+
46+
4. Start dev server:
47+
48+
```bash
49+
LOWCODER_API_SERVICE_URL=http://localhost:3000 yarn start
50+
```
51+
3852
5. After dev server starts successfully, it will be automatically opened in the default browser.
3953

4054
### Before submitting a pull request
4155

4256
In addition, before submitting a pull request, please make sure the following is done:
4357

4458
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)

client/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.8
1+
2.1.4

0 commit comments

Comments
 (0)