generated from react-component/portal
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bump dumi@2.x.x && father 4.x.x (#9)
- Loading branch information
Showing
11 changed files
with
81 additions
and
33 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,22 @@ | ||
// more config: https://d.umijs.org/config | ||
import { defineConfig } from 'dumi'; | ||
|
||
export default defineConfig({ | ||
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'], | ||
themeConfig: { | ||
name: 'mutate-observer', | ||
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4', | ||
}, | ||
outputPath: '.doc', | ||
exportStatic: {}, | ||
styles: [ | ||
` | ||
section.dumi-default-header-left { | ||
width: 240px; | ||
} | ||
.markdown table { | ||
width: auto !important; | ||
} | ||
`, | ||
], | ||
}); |
File renamed without changes.
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
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
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
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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## basic | ||
--- | ||
title: basic | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/basic.tsx" /> | ||
<code src="../examples/basic.tsx"></code> |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: rc-mutate-observer | ||
hero: | ||
title: rc-mutate-observer | ||
description: React Mutate Observer Component | ||
--- | ||
|
||
<embed src="../README.md"></embed> |
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
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 @@ | ||
/* | ||
用于 dumi 改造使用, | ||
可用于将 examples 的文件批量修改为 demo 引入形式, | ||
其他项目根据具体情况使用。 | ||
*/ | ||
|
||
const fs = require('fs'); | ||
const glob = require('glob'); | ||
|
||
const paths = glob.sync('./docs/examples/*.tsx'); | ||
|
||
paths.forEach(path => { | ||
const name = path.split('/').pop().split('.')[0]; | ||
fs.writeFile( | ||
`./docs/demo/${name}.md`, | ||
`--- | ||
title: ${name} | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
<code src="../examples/${name}.tsx"></code> | ||
`, | ||
'utf8', | ||
function(error) { | ||
if(error){ | ||
console.log(error); | ||
return false; | ||
} | ||
console.log(`${name} 更新成功~`); | ||
} | ||
) | ||
}); |
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