Skip to content

Commit

Permalink
chore: bump dumi@2.x.x (#446)
Browse files Browse the repository at this point in the history
* chore: bump dumi@2.x.x

* chore: update update-example.js and generate markdown file

* chore: local run compile
  • Loading branch information
DBSDs authored Nov 28, 2023
1 parent e85d617 commit e4d0bfa
Show file tree
Hide file tree
Showing 21 changed files with 126 additions and 59 deletions.
20 changes: 20 additions & 0 deletions .dumirc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConfig } from 'dumi';

export default defineConfig({
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
themeConfig: {
name: 'tree-select',
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
},
exportStatic: {},
outputPath: '.doc',
base: '/tree-select/',
publicPath: '/tree-select/',
styles: [
`
.markdown table {
width: auto !important;
}
`,
],
});
4 changes: 2 additions & 2 deletions .github/workflows/react-component-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: actions/setup-node@v1
with:
node-version: '12'
node-version: '18'

- name: cache package-lock.json
uses: actions/cache@v2
Expand All @@ -24,7 +24,7 @@ jobs:
key: lock-${{ github.sha }}

- name: create package-lock.json
run: npm i --package-lock-only
run: npm i --package-lock-only --ignore-scripts

- name: hack for singe file
run: |
Expand Down
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.storybook
.doc
*.iml
*.log
Expand Down Expand Up @@ -29,8 +28,8 @@ coverage
yarn.lock
package-lock.json
es/*
# umi
.umi
.umi-production
.umi-test
# dumi
.dumi/tmp
.dumi/tmp-test
.dumi/tmp-production
.env.local
21 changes: 0 additions & 21 deletions .umirc.ts

This file was deleted.

9 changes: 7 additions & 2 deletions docs/demo/basic.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## basic
---
title: basic
nav:
title: Demo
path: /demo
---

<code src="../../examples/basic.tsx">
<code src="../../examples/basic.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/big-data.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## big-data
---
title: big-data
nav:
title: Demo
path: /demo
---

<code src="../../examples/big-data.tsx">
<code src="../../examples/big-data.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/controlled.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## controlled
---
title: controlled
nav:
title: Demo
path: /demo
---

<code src="../../examples/controlled.tsx">
<code src="../../examples/controlled.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/custom-icons.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## custom-icons
---
title: custom-icons
nav:
title: Demo
path: /demo
---

<code src="../../examples/custom-icons.tsx">
<code src="../../examples/custom-icons.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/debug.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## debug
---
title: debug
nav:
title: Demo
path: /demo
---

<code src="../../examples/debug.tsx">
<code src="../../examples/debug.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/disable.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## disable
---
title: disable
nav:
title: Demo
path: /demo
---

<code src="../../examples/disable.tsx">
<code src="../../examples/disable.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/dynamic.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## dynamic
---
title: dynamic
nav:
title: Demo
path: /demo
---

<code src="../../examples/dynamic.tsx">
<code src="../../examples/dynamic.tsx"></code>
3 changes: 0 additions & 3 deletions docs/demo/field-names.md

This file was deleted.

8 changes: 8 additions & 0 deletions docs/demo/fieldNames.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: fieldNames
nav:
title: Demo
path: /demo
---

<code src="../../examples/fieldNames.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/filter.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## filter
---
title: filter
nav:
title: Demo
path: /demo
---

<code src="../../examples/filter.tsx">
<code src="../../examples/filter.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/form.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## form
---
title: form
nav:
title: Demo
path: /demo
---

<code src="../../examples/form.tsx">
<code src="../../examples/form.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/treeNodeLabelProp.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## treeNodeLabelProp
---
title: treeNodeLabelProp
nav:
title: Demo
path: /demo
---

<code src="../../examples/treeNodeLabelProp.tsx">
<code src="../../examples/treeNodeLabelProp.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/width.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## width
---
title: width
nav:
title: Demo
path: /demo
---

<code src="../../examples/width.tsx">
<code src="../../examples/width.tsx"></code>
4 changes: 3 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: rc-tree-select
hero:
title: rc-tree-select
description: React Tree Select Component
---

<embed src="../README.md"></embed>
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"start": "dumi dev",
"build": "dumi build",
"compile": "father build",
"prepare": "dumi setup",
"prepublishOnly": "npm run compile && np --yolo --no-publish --any-branch",
"lint": "eslint src/ examples/ --ext .tsx,.ts,.jsx,.js",
"prettier": "prettier '{src,tests}/**/*.{ts,tsx}' 'tests/**/*.js' --write",
Expand All @@ -48,12 +49,13 @@
"@rc-component/trigger": "^1.5.0",
"@testing-library/react": "^12.0.0",
"@types/jest": "^26.0.5",
"@types/node": "^20.9.0",
"@types/react": "^16.8.19",
"@types/react-dom": "^16.8.4",
"@types/warning": "^3.0.0",
"@umijs/fabric": "^3.0.0",
"cross-env": "^7.0.2",
"dumi": "^1.1.12",
"dumi": "^2.0.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.1.1",
"enzyme-to-json": "^3.4.0",
Expand All @@ -67,7 +69,7 @@
"rc-virtual-list": "^1.1.0",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"typescript": "^3.5.2"
"typescript": "^5.0.0"
},
"dependencies": {
"@babel/runtime": "^7.10.1",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"esModuleInterop": true,
"paths": {
"@/*": ["src/*"],
"@@/*": ["src/.umi/*"],
"@@/*": [".dumi/tmp/*"],
"rc-tree-select": ["src/index.tsx"]
}
}
Expand Down
9 changes: 7 additions & 2 deletions update-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ paths.forEach(path => {
const name = path.split('/').pop().split('.')[0];
fs.writeFile(
`./docs/demo/${name}.md`,
`## ${name}
`---
title: ${name}
nav:
title: Demo
path: /demo
---
<code src="../../examples/${name}.tsx">
<code src="../../examples/${name}.tsx"></code>
`,
'utf8',
function(error) {
Expand Down

1 comment on commit e4d0bfa

@vercel
Copy link

@vercel vercel bot commented on e4d0bfa Nov 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment failed with the following error:

Resource is limited - try again in 6 hours (more than 100, code: "api-deployments-free-per-day").

Please sign in to comment.