Skip to content

Commit ac1990b

Browse files
committed
chore: bump dumi@2.x.x
1 parent 0553047 commit ac1990b

File tree

13 files changed

+102
-42
lines changed

13 files changed

+102
-42
lines changed

.dumirc.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { defineConfig } from 'dumi';
2+
3+
export default defineConfig({
4+
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
5+
themeConfig: {
6+
name: 'rc-overflow',
7+
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
8+
},
9+
exportStatic: {},
10+
outputPath: 'docs-dist',
11+
base: '/rc-overflow/',
12+
publicPath: '/rc-overflow/',
13+
styles: [
14+
`
15+
.markdown table {
16+
width: auto !important;
17+
}
18+
`,
19+
],
20+
});

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
- uses: actions/setup-node@v1
1717
with:
18-
node-version: '12'
18+
node-version: '18'
1919

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

2626
- name: create package-lock.json
27-
run: npm i --package-lock-only
27+
run: npm i --package-lock-only --ignore-scripts
2828

2929
- name: hack for singe file
3030
run: |

.gitignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.storybook
21
*.iml
32
*.log
43
.idea/
@@ -29,5 +28,10 @@ yarn.lock
2928
package-lock.json
3029
coverage/
3130
.doc
32-
.umi
33-
dist/
31+
dist/
32+
33+
# dumi
34+
.dumi/tmp
35+
.dumi/tmp-test
36+
.dumi/tmp-production
37+
.env.local

.umirc.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/demo/base.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/demo/basic.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: basic
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
7+
8+
<code src="../../examples/basic.tsx"></code>

docs/demo/blink.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
## blink
1+
---
2+
title: blink
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
27

3-
<code src="../../examples/blink.tsx">
8+
<code src="../../examples/blink.tsx"></code>

docs/demo/fill-width.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
## fill-width
1+
---
2+
title: fill-width
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
27

3-
<code src="../../examples/fill-width.tsx">
8+
<code src="../../examples/fill-width.tsx"></code>

docs/demo/raw-render.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
## Raw Render
1+
---
2+
title: raw-render
3+
nav:
4+
title: Demo
5+
path: /demo
6+
---
27

3-
<code src="../../examples/raw-render.tsx">
8+
<code src="../../examples/raw-render.tsx"></code>

docs/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
title: rc-overflow
2+
hero:
3+
title: rc-overflow
4+
description: React Overflow Component
35
---
46

5-
<embed src="../README.md" />
7+
<embed src="../README.md" ></embed>

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"start": "dumi dev",
3333
"docs:build": "dumi build",
3434
"docs:deploy": "gh-pages -d docs-dist",
35-
"compile": "father-build",
35+
"compile": "father build",
36+
"prepare": "dumi setup",
3637
"deploy": "npm run docs:build && npm run docs:deploy",
3738
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
3839
"test": "father test",
@@ -57,14 +58,14 @@
5758
"@types/react": "^16.14.2",
5859
"@types/react-dom": "^16.9.10",
5960
"@umijs/fabric": "^2.0.8",
61+
"glob": "^10.0.0",
6062
"cross-env": "^7.0.2",
61-
"dumi": "^1.1.10",
63+
"dumi": "^2.0.0",
6264
"enzyme": "^3.0.0",
6365
"enzyme-adapter-react-16": "^1.0.1",
6466
"enzyme-to-json": "^3.4.0",
6567
"eslint": "^7.0.0",
66-
"father": "^2.13.4",
67-
"father-build": "^1.19.1",
68+
"father": "^4.0.0",
6869
"less": "^3.10.3",
6970
"np": "^7.0.0",
7071
"prettier": "^2.0.5",

script/update-content.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
用于 dumi 改造使用,
3+
可用于将 examples 的文件批量修改为 demo 引入形式,
4+
其他项目根据具体情况使用。
5+
*/
6+
7+
const fs = require('fs');
8+
const glob = require('glob');
9+
10+
const paths = glob.sync('./examples/*.tsx');
11+
12+
paths.forEach(path => {
13+
const name = path.split('/').pop().split('.')[0];
14+
fs.writeFile(
15+
`./docs/demo/${name}.md`,
16+
`---
17+
title: ${name}
18+
nav:
19+
title: Demo
20+
path: /demo
21+
---
22+
23+
<code src="../../examples/${name}.tsx"></code>
24+
`,
25+
'utf8',
26+
function(error) {
27+
if(error){
28+
console.log(error);
29+
return false;
30+
}
31+
console.log(`${name} 更新成功~`);
32+
}
33+
)
34+
});

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"esModuleInterop": true,
1010
"paths": {
1111
"@/*": ["src/*"],
12-
"@@/*": ["src/.umi/*"],
12+
"@@/*": [".dumi/tmp/*"],
1313
"rc-overflow": ["src/index.tsx"]
1414
}
1515
}

0 commit comments

Comments
 (0)