Skip to content
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

feat: init yunti-ui-lowcode-materials #3

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
registry=http://dev-npm.tenxcloud.net/
strict-peer-dependencies=false
always-auth=true
auto-install-peers=true
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ ni
# 开发文档
nr dev

# 开发 antd
nr dev:antd
# 开发 yunti-ui
nr dev:yunti-ui

# 开发 react-markdown
nr dev:markdown
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ features:
description: markdown 低码资产
- emoji: 🚀
title: ant design
# link: /lowcode-materials/antd-lowcode-materials
description: antd 低码资产 (开发中)
link: /lowcode-materials/yunti-ui-lowcode-materials
description: yunti-ui 低码资产 (开发中)
---
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"keywords": [
"low-code",
"low-code engine",
"antd",
"yunti-ui",
"materials"
],
"license": "ISC",
"scripts": {
"build": "dumi build",
"dev": "dumi dev",
"dev:antd": "concurrently \"pnpm --filter 'antd-*' dev\" \"npm run dev\"",
"dev:markdown": "concurrently \"pnpm --filter 'react-markdown-*' dev\" \"npm run dev\"",
"dev:yunti-ui": "concurrently \"pnpm --filter 'yunti-ui-*' dev\" \"npm run dev\"",
"lint-staged": "lint-staged",
"prepare": "husky install",
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
5 changes: 0 additions & 5 deletions packages/antd-lowcode-materials/README.md

This file was deleted.

1 change: 1 addition & 0 deletions packages/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# 总览

- [react-markdown](./react-markdown-lowcode-materials)
- [yunti-ui](./yunti-ui-lowcode-materials)
40 changes: 40 additions & 0 deletions packages/yunti-ui-lowcode-materials/.fatherrc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { defineConfig } from 'father';
import { join } from 'path';
import { IS_DEV } from '../../constants';

const library = 'YuntiUiLowcode';

const externals = {
react: 'var window.React',
lodash: 'var window._',
};

const output = IS_DEV
? join(__dirname, '../../public/yunti-ui-lowcode-materials/dist/umd')
: undefined;

export default defineConfig({
extends: '../../.fatherrc.base.ts',
umd: {
entry: {
'src/index.tsx': {
name: library,
sourcemap: true,
externals,
output,
},
'lowcode/meta.ts': {
name: 'YuntiUiLowcodeMeta',
sourcemap: true,
externals,
output,
},
'lowcode/view.tsx': {
name: library,
sourcemap: true,
externals,
output,
},
},
},
});
2 changes: 2 additions & 0 deletions packages/yunti-ui-lowcode-materials/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
5 changes: 5 additions & 0 deletions packages/yunti-ui-lowcode-materials/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# yunti-ui-lowcode-materials

Low-code Materials for yunti-ui

---
101 changes: 101 additions & 0 deletions packages/yunti-ui-lowcode-materials/demo/assets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"version": "1.1.0",
"packages": [
{
"id": "dayjs",
"urls": ["http://172.22.96.37/[email protected]/dayjs.min.js"],
"library": "dayjs",
"package": "dayjs",
"version": "1.11.6",
"editUrls": ["http://172.22.96.37/[email protected]/dayjs.min.js"]
},
{
"id": "antd",
"meta": {},
"urls": [
"https://jsd.onmicrosoft.cn/npm/[email protected]/dist/antd.min.js",
"https://jsd.onmicrosoft.cn/npm/[email protected]/dist/reset.min.css"
],
"library": "antd",
"package": "antd",
"version": "5.9.4",
"editUrls": null
},
{
"id": "@ant-design/icons",
"urls": ["//g.alicdn.com/code/npm/@ali/ant-design-icons-cdn/4.5.0/index.umd.min.js"],
"library": "icons",
"package": "@ant-design/icons",
"version": "4.7.0"
},
{
"id": "@alifd/next",
"urls": [
"https://g.alicdn.com/legao-comp/web_bundle_0724/@alife/theme-254/1.29.5/@alifd/next/1.24.18/theme.7c897c2.css",
"https://g.alicdn.com/legao-comp/web_bundle_0724/@alifd/next/1.24.18/main.059bccd.js"
],
"library": "Next",
"package": "@alifd/next",
"version": "1.24.18"
},
{
"id": "moment",
"urls": ["https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js"],
"library": "moment",
"package": "moment",
"version": "2.24.0"
},
{
"id": "lodash",
"meta": null,
"urls": ["https://jsd.onmicrosoft.cn/npm/[email protected]/lodash.min.js"],
"library": "_",
"package": "lodash",
"version": "4.17.21",
"editUrls": null
},
{
"id": "@tenx-ui/auth-utils",
"meta": {},
"urls": ["http://172.22.96.37/@tenx-ui/[email protected]/dist/umd/auth-utils.min.js"],
"library": "authUtils",
"package": "@tenx-ui/auth-utils",
"version": "0.0.2",
"editUrls": null
},
{
"id": "@yunti/yunti-ui-lowcode-materials",
"meta": {},
"urls": ["/lowcode-materials-public/yunti-ui-lowcode-materials/dist/umd/index.min.js"],
"library": "YuntiUiLowcode",
"package": "@yunti/yunti-ui-lowcode-materials",
"version": "0.1.0",
"editUrls": ["/lowcode-materials-public/yunti-ui-lowcode-materials/dist/umd/view.min.js"]
}
],
"components": [
{
"url": "/lowcode-materials-public/yunti-ui-lowcode-materials/dist/umd/meta.min.js",
"version": "0.1.0",
"reference": {
"id": "@yunti/yunti-ui-lowcode-materials",
"version": "0.1.0"
},
"exportName": "YuntiUiLowcodeMeta"
}
],
"sort": {
"groupList": ["容器/布局", "组件", "表单", "图表组件", "图标", "低码组件"],
"categoryList": [
"基础组件",
"输入组件",
"布局组件",
"容器组件",
"数据组件",
"其他",
"formily 表单容器",
"formily 表单组件",
"业务组件"
]
}
}
13 changes: 13 additions & 0 deletions packages/yunti-ui-lowcode-materials/demo/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* iframe: true
* compact: true
*/
import { Designer } from '@yunti/shared';
import React from 'react';
import assets from './assets.json';

const DesignerDemo = () => (
<Designer scenarioName="yunti-ui" displayName="yunti-ui" assets={assets} />
);

export default DesignerDemo;
6 changes: 6 additions & 0 deletions packages/yunti-ui-lowcode-materials/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: yunti-ui
order: 0
---

<code src="./demo/index.tsx"></code>
12 changes: 12 additions & 0 deletions packages/yunti-ui-lowcode-materials/lowcode/meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import pkgJson from '../package.json';
import tree from './tree/meta';

const components = [tree].map(c => {
if (c.npm) {
c.npm.version = pkgJson.version;
}
return c;
});

// 注意不要使用 default 导出
export { components };
Loading