-
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
0 parents
commit 533d90e
Showing
44 changed files
with
25,144 additions
and
0 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('@yuntijs/lint').changelog; |
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 @@ | ||
module.exports = require('@yuntijs/lint').commitlint; |
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,21 @@ | ||
const FILTER_PATHS = ['umdjs/xx/xx']; | ||
|
||
export function patchRoutes({ routes, routeComponents }) { | ||
Object.keys(routes).forEach(key => { | ||
console.log('key', key); | ||
if (FILTER_PATHS.includes(key) || key.toUpperCase().endsWith('/README')) { | ||
delete routes[key]; | ||
delete routeComponents[key]; | ||
} | ||
}); | ||
} | ||
|
||
export function patchClientRoutes({ routes }) { | ||
const i = routes?.[0]?.children?.findIndex(route => route.id === 'DocLayout'); | ||
if (i === -1 || !routes[0].children[i]?.children?.length) return; | ||
const filterRoute = routes[0].children[i].children.filter( | ||
item => !(item.id.toUpperCase().endsWith('/README') || FILTER_PATHS.includes(item.id)) | ||
); | ||
routes[0].children[i].children = filterRoute; | ||
routes[0].children[i].routes = filterRoute; | ||
} |
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,7 @@ | ||
body { | ||
#root { | ||
overflow: auto; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
} |
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,4 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"include": ["**/*"] | ||
} |
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,63 @@ | ||
import { defineConfig } from 'dumi'; | ||
import { readdirSync } from 'fs'; | ||
import { join } from 'path'; | ||
|
||
const PUBLIC_PATH = '/umdjs/'; | ||
const isProduction = process.env.NODE_ENV === 'production'; | ||
|
||
const headPkgList: string[] = []; | ||
const pkgDirList = readdirSync(join(__dirname, 'packages')).filter( | ||
pkg => !pkg.includes('.') && !headPkgList.includes(pkg) | ||
); | ||
const pkgs = { | ||
// | ||
}; | ||
export const alias = pkgDirList.reduce((pre, name) => { | ||
pre[`@umdjs/${pkgs[name]}`] = join(__dirname, 'packages', name, 'src'); | ||
return { | ||
...pre, | ||
}; | ||
}, {}); | ||
|
||
export default defineConfig({ | ||
alias, | ||
// autoAlias: true, | ||
base: isProduction ? PUBLIC_PATH : '/', | ||
resolve: { | ||
docDirs: ['docs'], | ||
atomDirs: [{ type: 'packages', dir: 'packages' }], | ||
}, | ||
favicons: [`${PUBLIC_PATH}img/favicon.png`], | ||
publicPath: PUBLIC_PATH, | ||
outputPath: `./dist${PUBLIC_PATH}`, | ||
themeConfig: { | ||
name: 'UMDjs', | ||
logo: `${PUBLIC_PATH}img/logo.svg`, | ||
nav: [ | ||
{ title: 'Development', link: '/guide' }, | ||
{ title: 'Packages', link: '/packages' }, | ||
], | ||
}, | ||
ignoreMomentLocale: true, | ||
mfsu: { | ||
strategy: 'normal', | ||
shared: { | ||
react: { | ||
singleton: true, | ||
}, | ||
}, | ||
}, | ||
// 默认重定向到子包的 src 文件夹 | ||
monorepoRedirect: { | ||
peerDeps: true, | ||
useRootProject: true, | ||
}, | ||
lessLoader: { | ||
javascriptEnabled: true, | ||
strictMath: false, | ||
math: 'parens-division', | ||
modifyVars: { | ||
// '@ant-prefix': PREFIX_CLS, | ||
}, | ||
}, | ||
}); |
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,16 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab |
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 @@ | ||
# Eslintignore for YuntiJS | ||
################################################################ | ||
|
||
# dependencies | ||
node_modules | ||
|
||
# ci | ||
.coverage | ||
coverage | ||
|
||
# test | ||
jest* | ||
_test_ | ||
__test__ | ||
|
||
# umi | ||
.umi | ||
.umi-production | ||
.umi-test | ||
.dumi/tmp* | ||
|
||
# production | ||
dist | ||
es | ||
lib | ||
logs | ||
|
||
# files generated by yunti lowcode | ||
packages/console/**/*.jsx | ||
packages/console/**/*.js | ||
|
||
# misc | ||
# add other ignore file below | ||
packages/server/public | ||
packages/k8s-client/docs |
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 @@ | ||
module.exports = require('@yuntijs/lint').eslint; |
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,34 @@ | ||
name: '🐛 反馈缺陷 Bug Report' | ||
description: '反馈一个问题缺陷 | Report an bug' | ||
title: '[Bug] ' | ||
labels: '🐛 Bug' | ||
body: | ||
- type: dropdown | ||
attributes: | ||
label: '💻 系统环境 | Operating System' | ||
options: | ||
- Windows | ||
- macOS | ||
- Ubuntu | ||
- Other Linux | ||
- Other | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: '🐛 问题描述 | Bug Description' | ||
description: A clear and concise description of the bug. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: '🚦 期望结果 | Expected Behavior' | ||
description: A clear and concise description of what you expected to happen. | ||
- type: textarea | ||
attributes: | ||
label: '📷 复现步骤 | Recurrence Steps' | ||
description: A clear and concise description of how to recurrence. | ||
- type: textarea | ||
attributes: | ||
label: '📝 补充信息 | Additional Information' | ||
description: If your problem needs further explanation, or if the issue you're seeing cannot be reproduced in a gist, please add more information here. |
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,21 @@ | ||
name: '🌠 功能需求 Feature Request' | ||
description: '需求或建议 | Suggest an idea' | ||
title: '[Request] ' | ||
labels: '🌠 Feature Request' | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: '🥰 需求描述 | Feature Description' | ||
description: Please add a clear and concise description of the problem you are seeking to solve with this feature request. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: '🧐 解决方案 | Proposed Solution' | ||
description: Describe the solution you'd like in a clear and concise manner. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: '📝 补充信息 | Additional Information' | ||
description: Add any other context about the problem here. |
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,15 @@ | ||
name: '😇 疑问或帮助 Help Wanted' | ||
description: '疑问或需要帮助 | Need help' | ||
title: '[Question] ' | ||
labels: '😇 Help Wanted' | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: '🧐 问题描述 | Proposed Solution' | ||
description: A clear and concise description of the proplem. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: '📝 补充信息 | Additional Information' | ||
description: Add any other context about the problem here. |
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,7 @@ | ||
--- | ||
name: '📝 其他 Other' | ||
about: '其他问题 | Other issues' | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- |
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,17 @@ | ||
#### 💻 变更类型 | Change Type | ||
|
||
<!-- For change type, change [ ] to [x]. --> | ||
|
||
- [ ] ✨ feat | ||
- [ ] 🐛 fix | ||
- [ ] 💄 style | ||
- [ ] 🔨 chore | ||
- [ ] 📝 docs | ||
|
||
#### 🔀 变更说明 | Description of Change | ||
|
||
<!-- Thank you for your Pull Request. Please provide a description above. --> | ||
|
||
#### 📝 补充信息 | Additional Information | ||
|
||
<!-- Add any other context about the Pull Request here. --> |
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,32 @@ | ||
name: Dependabot Auto Merge | ||
on: | ||
pull_request_target: | ||
types: [labeled, edited] | ||
|
||
jobs: | ||
merge: | ||
if: contains(github.event.pull_request.labels.*.name, 'dependencies') | ||
name: Dependabot Auto Merge | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js v18.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install pnpm v8.x | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Install deps | ||
run: pnpm i | ||
|
||
- name: Merge | ||
uses: ahmadnassri/action-dependabot-auto-merge@v2 | ||
with: | ||
command: merge | ||
target: minor | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
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,45 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
# https://docs.github.com/zh/actions/using-workflows/events-that-trigger-workflows#workflow_run | ||
workflow_run: | ||
workflows: | ||
- 'Build and Release' | ||
types: | ||
- completed | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to GitHub Pages | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js v20.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install pnpm v9.x | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 9 | ||
|
||
- name: Install deps | ||
run: pnpm install | ||
|
||
- name: Build website | ||
run: npm run build:docs | ||
|
||
# Popular action to deploy to GitHub Pages: | ||
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GH_TOKEN }} | ||
publish_dir: ./dist/umdjs |
Oops, something went wrong.