Skip to content

Commit

Permalink
chore: bump [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
DBSDs committed Nov 15, 2023
1 parent 0553047 commit ac1990b
Show file tree
Hide file tree
Showing 13 changed files with 102 additions and 42 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: 'rc-overflow',
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
},
exportStatic: {},
outputPath: 'docs-dist',
base: '/rc-overflow/',
publicPath: '/rc-overflow/',
styles: [
`
.markdown table {
width: auto !important;
}
`,
],
});
4 changes: 2 additions & 2 deletions .github/workflows/main.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
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.storybook
*.iml
*.log
.idea/
Expand Down Expand Up @@ -29,5 +28,10 @@ yarn.lock
package-lock.json
coverage/
.doc
.umi
dist/
dist/

# dumi
.dumi/tmp
.dumi/tmp-test
.dumi/tmp-production
.env.local
21 changes: 0 additions & 21 deletions .umirc.ts

This file was deleted.

3 changes: 0 additions & 3 deletions docs/demo/base.md

This file was deleted.

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

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

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

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

<code src="../../examples/raw-render.tsx">
<code src="../../examples/raw-render.tsx"></code>
6 changes: 4 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: rc-overflow
hero:
title: rc-overflow
description: React Overflow Component
---

<embed src="../README.md" />
<embed src="../README.md" ></embed>
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"start": "dumi dev",
"docs:build": "dumi build",
"docs:deploy": "gh-pages -d docs-dist",
"compile": "father-build",
"compile": "father build",
"prepare": "dumi setup",
"deploy": "npm run docs:build && npm run docs:deploy",
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
"test": "father test",
Expand All @@ -57,14 +58,14 @@
"@types/react": "^16.14.2",
"@types/react-dom": "^16.9.10",
"@umijs/fabric": "^2.0.8",
"glob": "^10.0.0",
"cross-env": "^7.0.2",
"dumi": "^1.1.10",
"dumi": "^2.0.0",
"enzyme": "^3.0.0",
"enzyme-adapter-react-16": "^1.0.1",
"enzyme-to-json": "^3.4.0",
"eslint": "^7.0.0",
"father": "^2.13.4",
"father-build": "^1.19.1",
"father": "^4.0.0",
"less": "^3.10.3",
"np": "^7.0.0",
"prettier": "^2.0.5",
Expand Down
34 changes: 34 additions & 0 deletions script/update-content.js
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('./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} 更新成功~`);
}
)
});
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-overflow": ["src/index.tsx"]
}
}
Expand Down

0 comments on commit ac1990b

Please sign in to comment.