forked from entropy-cloud/nop-chaos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8169ab2
commit d168ce7
Showing
1,100 changed files
with
277,786 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,116 +1,16 @@ | ||
# Logs | ||
logs | ||
!**/glob-import/dir/node_modules | ||
.DS_Store | ||
.idea | ||
*.cpuprofile | ||
*.local | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
/.vscode/ | ||
/packages/vite/LICENSE | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
dist-ssr | ||
explorations | ||
node_modules | ||
playground-temp | ||
temp | ||
TODOs.md | ||
.eslintcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,78 @@ | ||
# nop-chaos | ||
# Nop Chaos (Nop Platform 2.0的前端部分) | ||
|
||
#### 介绍 | ||
{**以下是 Gitee 平台说明,您可以替换此简介** | ||
Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 | ||
无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} | ||
Nop Platform 2.0是基于可逆计算原理从零开始构建的新一代低代码平台,它致力于克服低代码平台无法摆脱穷举法的困境,从理论层面有效的解决粗粒度软件复用的问题。nop-chaos是Nop平台的前端部分,基于Vue3.0、ant-design-vue、百度AMIS、logicflow、xspreadsheet等技术实现。 | ||
|
||
#### 设计原理 | ||
|
||
[可逆计算:下一代软件构造理论](https://zhuanlan.zhihu.com/p/64004026) | ||
|
||
[可逆计算的技术实现](https://zhuanlan.zhihu.com/p/163852896) | ||
|
||
[从张量积看低代码平台的设计](https://zhuanlan.zhihu.com/p/531474176) | ||
|
||
[低代码平台需要什么样的ORM引擎?](https://zhuanlan.zhihu.com/p/543252423) | ||
|
||
[为什么百度AMIS是一个优秀的设计](https://zhuanlan.zhihu.com/p/599773955) | ||
|
||
#### 软件架构 | ||
软件架构说明 | ||
nop-chaos采用pnpm多模块管理,具有如下模块: | ||
1. nop-site: 前端程序主框架以及对AMIS框架的集成。其中主框架是基于[jeecgboot-vue3](https://gitee.com/jeecg/jeecgboot-vue3)和[vben-admin](https://doc.vvbin.cn/guide/introduction)项目进行改造。 | ||
|
||
2. nop-server-tool: 在服务端通过rollup对js库进行转换打包的工具 | ||
|
||
3. nop-amis-editor: 对amis-editor的简单封装,可以嵌入在iframe中独立使用 | ||
|
||
4. 其他模块为目前正在考虑集成的相关技术,尚未包含实际内容 | ||
|
||
|
||
#### 安装与使用 | ||
|
||
|
||
- 如果没有安装 Node.js 16,下载地址:<https://nodejs.org> | ||
|
||
```bash | ||
# 验证 | ||
node -v | ||
``` | ||
|
||
- 如果没有安装 pnpm 执行安装 | ||
|
||
```bash | ||
npm i -g pnpm | ||
# 验证 | ||
pnpm -v | ||
``` | ||
|
||
- 获取代码 | ||
|
||
```bash | ||
git clone https://gitee.com/canonical-entropy/nop-chaos.git | ||
cd nop-chaos | ||
``` | ||
注意:不要放到中文或带空格的目录下。 | ||
|
||
#### 安装教程 | ||
- 安装依赖 | ||
|
||
1. xxxx | ||
2. xxxx | ||
3. xxxx | ||
```bash | ||
pnpm config set registry https://registry.npm.taobao.org | ||
pnpm config set ENTRYCLI_CDNURL=https://cdn.npm.taobao.org/dist/sentry-cli | ||
pnpm config set sentrycli_cdnurl=https://cdn.npm.taobao.org/dist/sentry-cli | ||
|
||
#### 使用说明 | ||
pnpm install | ||
``` | ||
|
||
1. xxxx | ||
2. xxxx | ||
3. xxxx | ||
- 开发调试 | ||
|
||
#### 参与贡献 | ||
```bash | ||
pnpm dev | ||
``` | ||
|
||
1. Fork 本仓库 | ||
2. 新建 Feat_xxx 分支 | ||
3. 提交代码 | ||
4. 新建 Pull Request | ||
- 打包 | ||
|
||
```bash | ||
pnpm build | ||
``` | ||
打包完成后,会在各模块的根目录生成 dist 文件夹 | ||
|
||
#### 特技 | ||
|
||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md | ||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) | ||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 | ||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 | ||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) | ||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
TARGET=../entropy-cloud/nop-web-amis-editor/src/main/resources/META-INF/resources/amis-editor | ||
rm -rf $TARGET | ||
cp -rf ./packages/nop-amis-editor/dist $TARGET | ||
|
||
TARGET=../entropy-cloud/nop-web-site/src/main/resources/META-INF/resources/ | ||
rm -rf $TARGET | ||
cp -rf ./packages/nop-site/dist $TARGET | ||
|
||
TARGET=../entropy-cloud/nop-js/src/main/resources/_vfs/nop/js/libs/nop-server-tool.mjs | ||
rm -rf $TARGET | ||
cp -f ./packages/nop-server-tool/dist/nop-server-tool.mjs $TARGET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"name": "nop-chaos", | ||
"version": "0.1.0", | ||
"private": true, | ||
"packageManager": "[email protected]", | ||
"workspaces": [ | ||
"packages/*" | ||
], | ||
"description": "Nop Platform Frontend", | ||
"scripts": { | ||
"all": "pnpm -r all", | ||
"dev": "pnpm -F nop-site dev", | ||
"build": "pnpm -r build", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix", | ||
"preview": "pnpm -F nop-site preview", | ||
"test": "pnpm -r test", | ||
"clean": "pnpm -r clean", | ||
"clean:all": "pnpm --package=rimraf -s dlx rimraf pnpm-lock.yaml **/dist **/node_modules", | ||
"reinstall": "pnpm clean:all && pnpm i", | ||
"preinstall": "npx only-allow pnpm" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^0.27.0", | ||
"eslint": "^8.31.0", | ||
"eslint-plugin-cypress": "^2.12.1", | ||
"typescript": "^4.9.4", | ||
"vite": "^4.0" | ||
}, | ||
"//": "use bin-wrapper-china to install gifslice package when network issue occurs", | ||
"pnpm": { | ||
"overrides": { | ||
"bin-wrapper": "npm:bin-wrapper-china" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
根据 [jqp-amis-editor](https://gitee.com/hyz79/jqp-amis-editor) 项目修改。 | ||
|
||
将AMIS Editor的功能封装为独立使用的JS,使用时只要嵌入IFrame即可。 | ||
通过postMessage实现与iframe的通信。 | ||
|
||
具体使用方式参见demo.html | ||
|
||
```javascript | ||
|
||
var frame = document.getElementById('editorIFrame'); | ||
var inited = false; | ||
window.addEventListener("message",event=>{ | ||
if(event.data == 'amis-editor-inited'){ | ||
if(inited) | ||
return | ||
inited = true; | ||
var msg = { | ||
type:'setSchema', | ||
data: { | ||
type: 'page', | ||
title: 'Test Page', | ||
body: 'MyPage' | ||
} | ||
} | ||
frame.contentWindow.postMessage(JSON.stringify(msg),"*") | ||
}else if(event.data == 'amis-editor-exit'){ | ||
alert('exit') | ||
}else{ | ||
var data = JSON.parse(event.data) | ||
if(data.type == 'save'){ | ||
alert('save:' + JSON.stringify(data.data)) | ||
} | ||
} | ||
}) | ||
```` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + React + TS</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="./src/index.tsx"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.