Skip to content

Commit

Permalink
feat: dumi 1.x -> 2.x (#178)
Browse files Browse the repository at this point in the history
* feat: dumi 1.x -> 2.x

* feat: update snapshots

* feat: update config
  • Loading branch information
kiner-tang authored Jan 20, 2023
1 parent 7ae5a99 commit c403700
Show file tree
Hide file tree
Showing 16 changed files with 76 additions and 37 deletions.
14 changes: 14 additions & 0 deletions .dumirc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from 'dumi';
import path from 'path';

export default defineConfig({
alias: {
'rc-image$': path.resolve('src'),
'rc-image/es': path.resolve('src'),
},
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
themeConfig: {
name: 'Image',
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
},
});
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,8 @@ es/
.umi
.umi-production
.umi-test


# dumi
.dumi/tmp
.dumi/tmp-production
19 changes: 0 additions & 19 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/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/controlledWithGroup.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## controlledWithGroup
---
title: controlledWithGroup
nav:
title: Demo
path: /demo
---

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

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

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

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

<code src="../examples/thumbnail.tsx">
<code src="../examples/thumbnail.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-image
hero:
title: rc-image
description: React Image.
---

<embed src="../README.md"></embed>
2 changes: 1 addition & 1 deletion now.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"src": "package.json",
"use": "@now/static-build",
"config": { "distDir": ".doc" }
"config": { "distDir": "dist" }
}
],
"routes": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@types/react-dom": "^18.0.0",
"@umijs/fabric": "^2.2.2",
"cross-env": "^7.0.2",
"dumi": "^1.1.4",
"dumi": "^2.1.4",
"eslint": "^7.6.0",
"father": "^4.0.0",
"glob": "^7.1.6",
Expand Down
1 change: 1 addition & 0 deletions tests/__snapshots__/controlled.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ exports[`Controlled With previewVisible 1`] = `
aria-modal="true"
class="rc-image-preview"
role="dialog"
style="display: none;"
>
<div
aria-hidden="true"
Expand Down
1 change: 1 addition & 0 deletions tests/__snapshots__/previewGroup.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ exports[`PreviewGroup With Controlled 1`] = `
aria-modal="true"
class="rc-image-preview"
role="dialog"
style="display: none;"
>
<div
aria-hidden="true"
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-image": ["src/index.ts"]
}
}
Expand Down

1 comment on commit c403700

@vercel
Copy link

@vercel vercel bot commented on c403700 Jan 20, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.