Skip to content

Commit 7000bf2

Browse files
falnyrludomikula
andauthored
WIP: Rebrand to Lowcoder (#134)
* refactor: rename classes in API server * refactor: rename openlocks-core to lowcoder-core * refactor: rename openblocks-dev-utils to lowcoder-dev-utils * refactor: rename openblocks-design to lowcoder-design * refactor: rename openblocks-comps to lowcoder-comps * refactor: rename openblocks-sdk to lowcoder-sdk * refactor: rename openblocks-ee to lowcoder-sdk * refactor: rename openblocks- lowcoder- * refactor: rename /openblocks to /lowcoder * refactor: rename openblocks. to lowcoder. * refactor: rename openblocks to lowcoder * refactor: rename Openblocks to Lowcoder * refactor: rename OpenBlocks to Lowcoder * refactor: rename openBlocks to lowcoder * refactor: rename folders and files * refactor: replace openblocks references with lowcoder * chore: bumped versions and pushed to npm registry * refactor: updated dependencies, switched to lowcoder folder --------- Co-authored-by: Ludovit Mikula <ludovit.mikula@mikori.sk>
1 parent ab9ace8 commit 7000bf2

File tree

2,180 files changed

+6360
-6569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,180 files changed

+6360
-6569
lines changed

client/.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# production
1616
/build
17-
/packages/openblocks/build
17+
/packages/lowcoder/build
1818

1919
# misc
2020
.DS_Store
@@ -52,4 +52,4 @@ TODO
5252
/ossutil_output
5353
package-lock.json
5454

55-
op.mjs
55+
op.mjs

client/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Simply run below command to start a backend server.
1010

1111
```bash
12-
docker run -d --name openblocks -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks" lowcoderorg/lowcoder-ce
12+
docker run -d --name lowcoder -p 3000:3000 -v "$PWD/stacks:/lowcoder-stacks" lowcoderorg/lowcoder-ce
1313
```
1414

1515
For more information, view our [docs](../docs/self-hosting)
@@ -20,13 +20,13 @@ For more information, view our [docs](../docs/self-hosting)
2020
2. Use the command below to build Docker image :
2121

2222
```bash
23-
docker build -f ./deploy/docker/Dockerfile -t openblocks-dev .
23+
docker build -f ./deploy/docker/Dockerfile -t lowcoder-dev .
2424
```
2525

2626
3. Start
2727

2828
```bash
29-
docker run -d --name openblocks-dev -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks" openblocks-dev
29+
docker run -d --name lowcoder-dev -p 3000:3000 -v "$PWD/stacks:/lowcoder-stacks" lowcoder-dev
3030
```
3131

3232
### Start develop
@@ -43,4 +43,4 @@ In addition, before submitting a pull request, please make sure the following is
4343

4444
1. If you’ve fixed a bug or added code that should be tested and add unit test suite.
4545
2. Run `yarn test` and ensure all test suites pass.
46-
3. If you add new dependency, use yarn workspace openblocks some-package to make sure yarn.lock is also updated.
46+
3. If you add new dependency, use yarn workspace lowcoder some-package to make sure yarn.lock is also updated.

client/config/test/jest.config.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from "node:path";
2-
import { buildVars } from "openblocks-dev-utils/buildVars.js";
3-
import { currentDirName } from "openblocks-dev-utils/util.js";
2+
import { buildVars } from "lowcoder-dev-utils/buildVars.js";
3+
import { currentDirName } from "lowcoder-dev-utils/util.js";
44

55
const globals = {};
66
buildVars.forEach(({ name, defaultValue }) => {
@@ -16,19 +16,19 @@ export default {
1616
moduleNameMapper: {
1717
"react-markdown": path.resolve(dirname, "./mocks/react-markdown.js"),
1818
"\\.md\\?url$": path.resolve(dirname, "./mocks/markdown-url-module.js"),
19-
"^@openblocks-ee(.*)$": path.resolve(
19+
"^@lowcoder-ee(.*)$": path.resolve(
2020
dirname,
21-
isEE ? "../../packages/openblocks/src/ee/$1" : "../../packages/openblocks/src/$1"
21+
isEE ? "../../packages/lowcoder/src/ee/$1" : "../../packages/lowcoder/src/$1"
2222
),
23-
"openblocks-sdk": path.resolve(dirname, "../../packages/openblocks/src/index.sdk"),
23+
"lowcoder-sdk": path.resolve(dirname, "../../packages/lowcoder/src/index.sdk"),
2424
},
2525
globals,
2626
// roots: ["<rootDir>/src"],
2727
modulePaths: [
2828
"<rootDir>/src",
29-
path.resolve(dirname, "../../packages/openblocks/src"),
30-
path.resolve(dirname, "../../packages/openblocks-comps/src"),
31-
path.resolve(dirname, "../../packages/openblocks-design/src"),
29+
path.resolve(dirname, "../../packages/lowcoder/src"),
30+
path.resolve(dirname, "../../packages/lowcoder-comps/src"),
31+
path.resolve(dirname, "../../packages/lowcoder-design/src"),
3232
],
3333
setupFiles: [path.resolve(dirname, "./jest.setup.js")],
3434
setupFilesAfterEnv: [path.resolve(dirname, "./jest.setup-after-env.js")],

client/jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export default {
2-
projects: ["<rootDir>/packages/openblocks", "<rootDir>/packages/openblocks-core"],
2+
projects: ["<rootDir>/packages/lowcoder", "<rootDir>/packages/lowcoder-core"],
33
};

client/package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
"node": "^14.18.0 || >=16.0.0"
1111
},
1212
"scripts": {
13-
"start": "yarn workspace openblocks start",
14-
"start:ee": "REACT_APP_EDITION=enterprise yarn workspace openblocks start",
15-
"start:ee-global": "REACT_APP_EDITION=enterprise-global yarn workspace openblocks start",
13+
"start": "yarn workspace lowcoder start",
14+
"start:ee": "REACT_APP_EDITION=enterprise yarn workspace lowcoder start",
15+
"start:ee-global": "REACT_APP_EDITION=enterprise-global yarn workspace lowcoder start",
1616
"build": "yarn node ./scripts/build.js",
17-
"test": "jest && yarn workspace openblocks-comps test",
18-
"prepare": "yarn workspace openblocks prepare",
19-
"build:core": "yarn workspace openblocks-core build",
20-
"test:core": "yarn workspace openblocks-core test"
17+
"test": "jest && yarn workspace lowcoder-comps test",
18+
"prepare": "yarn workspace lowcoder prepare",
19+
"build:core": "yarn workspace lowcoder-core build",
20+
"test:core": "yarn workspace lowcoder-core test"
2121
},
2222
"devDependencies": {
2323
"@babel/preset-env": "^7.20.2",
@@ -49,8 +49,8 @@
4949
"jest": "^29.3.0",
5050
"jest-environment-jsdom": "^29.0.3",
5151
"lint-staged": "^13.0.1",
52+
"lowcoder-dev-utils": "workspace:^",
5253
"mq-polyfill": "^1.1.8",
53-
"openblocks-dev-utils": "workspace:^",
5454
"prettier": "^2.7.0",
5555
"rimraf": "^3.0.2",
5656
"rollup": "^2.79.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# create-lowcoder-plugin
2+
3+
## Usage
4+
5+
```bash
6+
yarn create lowcoder-plugin my-lowcoder-plugin
7+
8+
# or
9+
10+
npm create lowcoder-plugin my-lowcoder-plugin
11+
```

client/packages/create-openblocks-plugin/index.js renamed to client/packages/create-lowcoder-plugin/index.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import { spawn } from "cross-spawn";
55
import { writeFileSync, existsSync } from "node:fs";
66
import chalk from "chalk";
77
import { createCommand } from "commander";
8-
import { readJson, currentDirName } from "openblocks-dev-utils/util.js";
8+
import { readJson, currentDirName } from "lowcoder-dev-utils/util.js";
99

1010
const currentDir = currentDirName(import.meta.url);
1111
const pkg = readJson(path.resolve(currentDir, "./package.json"));
1212

1313
const isUsingYarn = (process.env.npm_config_user_agent || "").indexOf("yarn") === 0;
14-
const cliPackageName = "openblocks-cli";
15-
const sdkPackageName = "openblocks-sdk";
14+
const cliPackageName = "lowcoder-cli";
15+
const sdkPackageName = "lowcoder-sdk";
1616

1717
let verbose = false;
1818
let registry;
@@ -89,11 +89,11 @@ function executeNodeScript({ cwd, args }, data, source) {
8989
}
9090

9191
/**
92-
* create openblocks comps project
92+
* create lowcoder comps project
9393
* 1. create dir
9494
* 2. create package.json
95-
* 3. install openblocks-cli
96-
* 4. run `openblocks-cli init`
95+
* 3. install lowcoder-cli
96+
* 4. run `lowcoder-cli init`
9797
*/
9898
async function createProject(projectName, options) {
9999
const { template, force } = options;
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"name": "create-openblocks-plugin",
3-
"version": "0.0.3",
2+
"name": "create-lowcoder-plugin",
3+
"version": "0.0.4",
44
"bin": "./index.js",
55
"type": "module",
66
"dependencies": {
77
"chalk": "4",
88
"commander": "^9.4.1",
99
"cross-spawn": "^7.0.3",
1010
"fs-extra": "^10.1.0",
11-
"openblocks-dev-utils": "workspace:^"
11+
"lowcoder-dev-utils": "workspace:^"
1212
},
1313
"license": "MIT",
1414
"keywords": [
15-
"openblocks"
15+
"lowcoder"
1616
]
1717
}

client/packages/create-openblocks-plugin/README.md

-11
This file was deleted.

client/packages/openblocks-cli-template-typescript/README-template.md renamed to client/packages/lowcoder-cli-template-typescript/README-template.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# openblocks comp lib
1+
# lowcoder comp lib
22

33
## Start
44

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# lowcoder-cli-template-typescript
2+
3+
This is the official typescript template of lowcoder-cli.
4+
5+
This template will be used by default.

client/packages/openblocks-cli-template-typescript/index.html renamed to client/packages/lowcoder-cli-template-typescript/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Openblocks Comp Playground</title>
7+
<title>Lowcoder Comp Playground</title>
88
<style>
99
#root {
1010
height: 100vh;

client/packages/openblocks-cli-template-typescript/index.tsx renamed to client/packages/lowcoder-cli-template-typescript/index.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import ReactDOM from "react-dom";
2-
import { CompIDE } from "openblocks-sdk";
3-
import { name, version, openblocks } from "./package.json";
2+
import { CompIDE } from "lowcoder-sdk";
3+
import { name, version, lowcoder } from "./package.json";
44
import compMap from "./src/index";
55

6-
import "openblocks-sdk/dist/style.css";
6+
import "lowcoder-sdk/dist/style.css";
77

88
function CompDevApp() {
99
return (
1010
<CompIDE
1111
compMap={compMap}
1212
packageName={name}
1313
packageVersion={version}
14-
compMeta={openblocks.comps}
14+
compMeta={lowcoder.comps}
1515
/>
1616
);
1717
}
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
2-
"name": "openblocks-cli-template-typescript",
3-
"version": "0.0.11",
2+
"name": "lowcoder-cli-template-typescript",
3+
"version": "0.0.12",
44
"type": "module",
55
"scripts": {
66
"start": "vite",
7-
"build": "openblocks-cli build"
7+
"build": "lowcoder-cli build"
88
},
9-
"openblocks": {
9+
"lowcoder": {
1010
"description": "",
1111
"comps": {
1212
"hello_world": {
1313
"name": "__i18n_helloWorldCompName__",
14-
"icon": "./icons/demo-icon.png"
14+
"icon": "./icons/demo-icon.svg"
1515
}
1616
}
1717
},
1818
"devDependencies": {
19-
"openblocks-cli": "workspace:^",
20-
"openblocks-sdk": "workspace:^",
19+
"lowcoder-cli": "workspace:^",
20+
"lowcoder-sdk": "workspace:^",
2121
"typescript": "^4.8.4",
2222
"vite": "^3.2.4"
2323
},
2424
"keywords": [
25-
"openblocks"
25+
"lowcoder"
2626
],
2727
"license": "MIT"
2828
}

client/packages/openblocks-cli-template-typescript/src/HelloWorldComp.tsx renamed to client/packages/lowcoder-cli-template-typescript/src/HelloWorldComp.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
NameConfig,
1010
eventHandlerControl,
1111
withMethodExposing,
12-
} from "openblocks-sdk";
12+
} from "lowcoder-sdk";
1313

1414
import styles from "./styles.module.css";
1515

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/// <reference types="lowcoder-cli/client" />
2+
3+
declare module "lowcoder-sdk";

client/packages/openblocks-cli-template-typescript/vite.config.js renamed to client/packages/lowcoder-cli-template-typescript/vite.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import config from "openblocks-cli/config/vite.config";
1+
import config from "lowcoder-cli/config/vite.config";
22
export default {
33
...config,
44
server: {
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# lowcoder-cli
2+
3+
CLI tool used to start build and publish lowcoder component library.

client/packages/openblocks-cli/actions/build.js renamed to client/packages/lowcoder-cli/actions/build.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ function validPackageJSON() {
1717
if (!packageJSON.version) {
1818
return "- package version is required";
1919
}
20-
if (!packageJSON.openblocks) {
21-
return "- openblocks field is required in package.json";
20+
if (!packageJSON.lowcoder) {
21+
return "- lowcoder field is required in package.json";
2222
}
23-
const openblocks = packageJSON.openblocks;
24-
if (!openblocks.comps || Object.keys(openblocks.comps).length === 0) {
23+
const lowcoder = packageJSON.lowcoder;
24+
if (!lowcoder.comps || Object.keys(lowcoder.comps).length === 0) {
2525
return "- not found any comps to build";
2626
}
2727

2828
const compErrors = [];
29-
Object.keys(openblocks.comps).forEach((name) => {
30-
const compManifest = packageJSON.openblocks.comps[name];
29+
Object.keys(lowcoder.comps).forEach((name) => {
30+
const compManifest = packageJSON.lowcoder.comps[name];
3131
if (!compManifest.icon) {
3232
// compErrors.push(`- comp ${name} must specify an icon`);
3333
return;
@@ -64,7 +64,7 @@ export default async function buildAction(options) {
6464
return;
6565
}
6666

67-
const compNames = Object.keys(packageJSON.openblocks.comps);
67+
const compNames = Object.keys(packageJSON.lowcoder.comps);
6868
console.cyan(`Name : ${packageJSON.name}`);
6969
console.cyan(`Version : ${packageJSON.version}`);
7070
console.cyan(`Comps : ${compNames.length}\n`);
@@ -78,7 +78,7 @@ export default async function buildAction(options) {
7878
await build(viteConfig);
7979

8080
// write package.json
81-
packageJSON.openblocks.entry = "index.js";
81+
packageJSON.lowcoder.entry = "index.js";
8282
writeFileSync(paths.appOutPackageJson, JSON.stringify(packageJSON, null, 2));
8383

8484
// copy locales
@@ -88,7 +88,7 @@ export default async function buildAction(options) {
8888

8989
// copy icon files
9090
compNames.forEach((name) => {
91-
const compManifest = packageJSON.openblocks.comps[name];
91+
const compManifest = packageJSON.lowcoder.comps[name];
9292
if (compManifest.icon) {
9393
copySync(paths.resolveApp(compManifest.icon), resolve(paths.appOutPath, compManifest.icon));
9494
}

client/packages/openblocks-cli/actions/init.js renamed to client/packages/lowcoder-cli/actions/init.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async function uninstall(dependencies) {
6464
*/
6565
export default async function initAction(options) {
6666
const { template, registry } = options;
67-
const templatePackageName = `openblocks-cli-template-${template}`;
67+
const templatePackageName = `lowcoder-cli-template-${template}`;
6868

6969
await install([templatePackageName], registry);
7070
console.log("template package installed");
@@ -74,10 +74,10 @@ export default async function initAction(options) {
7474
const templatePackageJson = fs.readJsonSync(templatePackageJsonFile);
7575
const appPackageJson = fs.readJsonSync(paths.appPackageJson);
7676

77-
appPackageJson.openblocks = templatePackageJson.openblocks || {};
77+
appPackageJson.lowcoder = templatePackageJson.lowcoder || {};
7878
appPackageJson.scripts = {
7979
start: "vite",
80-
build: "openblocks-cli build",
80+
build: "lowcoder-cli build",
8181
};
8282
fs.writeFileSync(paths.appPackageJson, JSON.stringify(appPackageJson, null, 2));
8383
console.log("package.json updated");

client/packages/openblocks-cli/config/paths.js renamed to client/packages/lowcoder-cli/config/paths.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from "node:path";
22
import fs from "node:fs";
3-
import { currentDirName } from "openblocks-dev-utils/util.js";
3+
import { currentDirName } from "lowcoder-dev-utils/util.js";
44

55
const currentDir = currentDirName(import.meta.url);
66
const appDirectory = fs.realpathSync(process.cwd());

0 commit comments

Comments
 (0)