Skip to content

WIP: Rebrand to Lowcoder #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8f02a47
rebrand API server
ludomikula May 10, 2023
ea88857
refactor: rename openlocks-core to lowcoder-core
falnyr May 11, 2023
6d89a13
refactor: rename openblocks-dev-utils to lowcoder-dev-utils
falnyr May 11, 2023
e0ecb33
refactor: rename openblocks-design to lowcoder-design
falnyr May 11, 2023
0c119ad
refactor: rename openblocks-comps to lowcoder-comps
falnyr May 11, 2023
cf0a870
refactor: rename openblocks-sdk to lowcoder-sdk
falnyr May 11, 2023
dec2350
refactor: rename openblocks-ee to lowcoder-sdk
falnyr May 11, 2023
18aaffc
refactor: rename openblocks- lowcoder-
falnyr May 11, 2023
b04b0ff
refactor: rename /openblocks to /lowcoder
falnyr May 11, 2023
f75715f
refactor: rename openblocks. to lowcoder.
falnyr May 11, 2023
c1a25c5
refactor: rename openblocks to lowcoder
falnyr May 11, 2023
2f5a085
refactor: rename Openblocks to Lowcoder
falnyr May 11, 2023
7130095
refactor: rename OpenBlocks to Lowcoder
falnyr May 11, 2023
c6f85fc
refactor: rename openBlocks to lowcoder
falnyr May 11, 2023
3a58d5f
refactor: renamed folders
falnyr May 11, 2023
a1c5c16
refactor: renamed folders and files
falnyr May 13, 2023
54dd179
Merge branch 'main' into feat/rebrand
falnyr May 13, 2023
30adab5
refactor: replaced openblocks references with lowcoder
falnyr May 13, 2023
ee73078
refactor: renamed folders for sonarcloud
falnyr May 13, 2023
dc9b82c
chore: bumped versions and pushed to npm registry
falnyr May 13, 2023
784c8e0
refactor: updated dependencies, switched to lowcoder folder
falnyr May 16, 2023
9a62020
Downgraded reactor-core version.
ludomikula May 16, 2023
980b84f
Merge branch 'main' into feat/rebrand
ludomikula May 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# production
/build
/packages/openblocks/build
/packages/lowcoder/build

# misc
.DS_Store
Expand Down Expand Up @@ -52,4 +52,4 @@ TODO
/ossutil_output
package-lock.json

op.mjs
op.mjs
8 changes: 4 additions & 4 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Simply run below command to start a backend server.

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

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

```bash
docker build -f ./deploy/docker/Dockerfile -t openblocks-dev .
docker build -f ./deploy/docker/Dockerfile -t lowcoder-dev .
```

3. Start

```bash
docker run -d --name openblocks-dev -p 3000:3000 -v "$PWD/stacks:/openblocks-stacks" openblocks-dev
docker run -d --name lowcoder-dev -p 3000:3000 -v "$PWD/stacks:/lowcoder-stacks" lowcoder-dev
```

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

1. If you’ve fixed a bug or added code that should be tested and add unit test suite.
2. Run `yarn test` and ensure all test suites pass.
3. If you add new dependency, use yarn workspace openblocks some-package to make sure yarn.lock is also updated.
3. If you add new dependency, use yarn workspace lowcoder some-package to make sure yarn.lock is also updated.
16 changes: 8 additions & 8 deletions client/config/test/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from "node:path";
import { buildVars } from "openblocks-dev-utils/buildVars.js";
import { currentDirName } from "openblocks-dev-utils/util.js";
import { buildVars } from "lowcoder-dev-utils/buildVars.js";
import { currentDirName } from "lowcoder-dev-utils/util.js";

const globals = {};
buildVars.forEach(({ name, defaultValue }) => {
Expand All @@ -16,19 +16,19 @@ export default {
moduleNameMapper: {
"react-markdown": path.resolve(dirname, "./mocks/react-markdown.js"),
"\\.md\\?url$": path.resolve(dirname, "./mocks/markdown-url-module.js"),
"^@openblocks-ee(.*)$": path.resolve(
"^@lowcoder-ee(.*)$": path.resolve(
dirname,
isEE ? "../../packages/openblocks/src/ee/$1" : "../../packages/openblocks/src/$1"
isEE ? "../../packages/lowcoder/src/ee/$1" : "../../packages/lowcoder/src/$1"
),
"openblocks-sdk": path.resolve(dirname, "../../packages/openblocks/src/index.sdk"),
"lowcoder-sdk": path.resolve(dirname, "../../packages/lowcoder/src/index.sdk"),
},
globals,
// roots: ["<rootDir>/src"],
modulePaths: [
"<rootDir>/src",
path.resolve(dirname, "../../packages/openblocks/src"),
path.resolve(dirname, "../../packages/openblocks-comps/src"),
path.resolve(dirname, "../../packages/openblocks-design/src"),
path.resolve(dirname, "../../packages/lowcoder/src"),
path.resolve(dirname, "../../packages/lowcoder-comps/src"),
path.resolve(dirname, "../../packages/lowcoder-design/src"),
],
setupFiles: [path.resolve(dirname, "./jest.setup.js")],
setupFilesAfterEnv: [path.resolve(dirname, "./jest.setup-after-env.js")],
Expand Down
2 changes: 1 addition & 1 deletion client/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default {
projects: ["<rootDir>/packages/openblocks", "<rootDir>/packages/openblocks-core"],
projects: ["<rootDir>/packages/lowcoder", "<rootDir>/packages/lowcoder-core"],
};
16 changes: 8 additions & 8 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"node": "^14.18.0 || >=16.0.0"
},
"scripts": {
"start": "yarn workspace openblocks start",
"start:ee": "REACT_APP_EDITION=enterprise yarn workspace openblocks start",
"start:ee-global": "REACT_APP_EDITION=enterprise-global yarn workspace openblocks start",
"start": "yarn workspace lowcoder start",
"start:ee": "REACT_APP_EDITION=enterprise yarn workspace lowcoder start",
"start:ee-global": "REACT_APP_EDITION=enterprise-global yarn workspace lowcoder start",
"build": "yarn node ./scripts/build.js",
"test": "jest && yarn workspace openblocks-comps test",
"prepare": "yarn workspace openblocks prepare",
"build:core": "yarn workspace openblocks-core build",
"test:core": "yarn workspace openblocks-core test"
"test": "jest && yarn workspace lowcoder-comps test",
"prepare": "yarn workspace lowcoder prepare",
"build:core": "yarn workspace lowcoder-core build",
"test:core": "yarn workspace lowcoder-core test"
},
"devDependencies": {
"@babel/preset-env": "^7.20.2",
Expand Down Expand Up @@ -49,8 +49,8 @@
"jest": "^29.3.0",
"jest-environment-jsdom": "^29.0.3",
"lint-staged": "^13.0.1",
"lowcoder-dev-utils": "workspace:^",
"mq-polyfill": "^1.1.8",
"openblocks-dev-utils": "workspace:^",
"prettier": "^2.7.0",
"rimraf": "^3.0.2",
"rollup": "^2.79.0",
Expand Down
11 changes: 11 additions & 0 deletions client/packages/create-lowcoder-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# create-lowcoder-plugin

## Usage

```bash
yarn create lowcoder-plugin my-lowcoder-plugin

# or

npm create lowcoder-plugin my-lowcoder-plugin
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import { spawn } from "cross-spawn";
import { writeFileSync, existsSync } from "node:fs";
import chalk from "chalk";
import { createCommand } from "commander";
import { readJson, currentDirName } from "openblocks-dev-utils/util.js";
import { readJson, currentDirName } from "lowcoder-dev-utils/util.js";

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

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

let verbose = false;
let registry;
Expand Down Expand Up @@ -89,11 +89,11 @@ function executeNodeScript({ cwd, args }, data, source) {
}

/**
* create openblocks comps project
* create lowcoder comps project
* 1. create dir
* 2. create package.json
* 3. install openblocks-cli
* 4. run `openblocks-cli init`
* 3. install lowcoder-cli
* 4. run `lowcoder-cli init`
*/
async function createProject(projectName, options) {
const { template, force } = options;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "create-openblocks-plugin",
"version": "0.0.3",
"name": "create-lowcoder-plugin",
"version": "0.0.4",
"bin": "./index.js",
"type": "module",
"dependencies": {
"chalk": "4",
"commander": "^9.4.1",
"cross-spawn": "^7.0.3",
"fs-extra": "^10.1.0",
"openblocks-dev-utils": "workspace:^"
"lowcoder-dev-utils": "workspace:^"
},
"license": "MIT",
"keywords": [
"openblocks"
"lowcoder"
]
}
11 changes: 0 additions & 11 deletions client/packages/create-openblocks-plugin/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# openblocks comp lib
# lowcoder comp lib

## Start

Expand Down
5 changes: 5 additions & 0 deletions client/packages/lowcoder-cli-template-typescript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# lowcoder-cli-template-typescript

This is the official typescript template of lowcoder-cli.

This template will be used by default.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Openblocks Comp Playground</title>
<title>Lowcoder Comp Playground</title>
<style>
#root {
height: 100vh;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import ReactDOM from "react-dom";
import { CompIDE } from "openblocks-sdk";
import { name, version, openblocks } from "./package.json";
import { CompIDE } from "lowcoder-sdk";
import { name, version, lowcoder } from "./package.json";
import compMap from "./src/index";

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

function CompDevApp() {
return (
<CompIDE
compMap={compMap}
packageName={name}
packageVersion={version}
compMeta={openblocks.comps}
compMeta={lowcoder.comps}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"name": "openblocks-cli-template-typescript",
"version": "0.0.11",
"name": "lowcoder-cli-template-typescript",
"version": "0.0.12",
"type": "module",
"scripts": {
"start": "vite",
"build": "openblocks-cli build"
"build": "lowcoder-cli build"
},
"openblocks": {
"lowcoder": {
"description": "",
"comps": {
"hello_world": {
"name": "__i18n_helloWorldCompName__",
"icon": "./icons/demo-icon.png"
"icon": "./icons/demo-icon.svg"
}
}
},
"devDependencies": {
"openblocks-cli": "workspace:^",
"openblocks-sdk": "workspace:^",
"lowcoder-cli": "workspace:^",
"lowcoder-sdk": "workspace:^",
"typescript": "^4.8.4",
"vite": "^3.2.4"
},
"keywords": [
"openblocks"
"lowcoder"
],
"license": "MIT"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
NameConfig,
eventHandlerControl,
withMethodExposing,
} from "openblocks-sdk";
} from "lowcoder-sdk";

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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// <reference types="lowcoder-cli/client" />

declare module "lowcoder-sdk";
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config from "openblocks-cli/config/vite.config";
import config from "lowcoder-cli/config/vite.config";
export default {
...config,
server: {
Expand Down
3 changes: 3 additions & 0 deletions client/packages/lowcoder-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# lowcoder-cli

CLI tool used to start build and publish lowcoder component library.
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ function validPackageJSON() {
if (!packageJSON.version) {
return "- package version is required";
}
if (!packageJSON.openblocks) {
return "- openblocks field is required in package.json";
if (!packageJSON.lowcoder) {
return "- lowcoder field is required in package.json";
}
const openblocks = packageJSON.openblocks;
if (!openblocks.comps || Object.keys(openblocks.comps).length === 0) {
const lowcoder = packageJSON.lowcoder;
if (!lowcoder.comps || Object.keys(lowcoder.comps).length === 0) {
return "- not found any comps to build";
}

const compErrors = [];
Object.keys(openblocks.comps).forEach((name) => {
const compManifest = packageJSON.openblocks.comps[name];
Object.keys(lowcoder.comps).forEach((name) => {
const compManifest = packageJSON.lowcoder.comps[name];
if (!compManifest.icon) {
// compErrors.push(`- comp ${name} must specify an icon`);
return;
Expand Down Expand Up @@ -64,7 +64,7 @@ export default async function buildAction(options) {
return;
}

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

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

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

// copy icon files
compNames.forEach((name) => {
const compManifest = packageJSON.openblocks.comps[name];
const compManifest = packageJSON.lowcoder.comps[name];
if (compManifest.icon) {
copySync(paths.resolveApp(compManifest.icon), resolve(paths.appOutPath, compManifest.icon));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async function uninstall(dependencies) {
*/
export default async function initAction(options) {
const { template, registry } = options;
const templatePackageName = `openblocks-cli-template-${template}`;
const templatePackageName = `lowcoder-cli-template-${template}`;

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

appPackageJson.openblocks = templatePackageJson.openblocks || {};
appPackageJson.lowcoder = templatePackageJson.lowcoder || {};
appPackageJson.scripts = {
start: "vite",
build: "openblocks-cli build",
build: "lowcoder-cli build",
};
fs.writeFileSync(paths.appPackageJson, JSON.stringify(appPackageJson, null, 2));
console.log("package.json updated");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from "node:path";
import fs from "node:fs";
import { currentDirName } from "openblocks-dev-utils/util.js";
import { currentDirName } from "lowcoder-dev-utils/util.js";

const currentDir = currentDirName(import.meta.url);
const appDirectory = fs.realpathSync(process.cwd());
Expand Down
Loading