Skip to content

Commit

Permalink
docs: Move to dumi (#164)
Browse files Browse the repository at this point in the history
* chore: mv docs

* clean up

* chore: fix docs
  • Loading branch information
zombieJ authored Nov 11, 2021
1 parent 5cb2b35 commit ee69c7a
Show file tree
Hide file tree
Showing 34 changed files with 27,298 additions and 49 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ lib
es
coverage
package-lock.json
.doc
.doc
.umi
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ React steps component.
npm install rc-steps
```

```jsx
```jsx | pure
<Steps current={1}>
<Steps.Step title="first" />
<Steps.Step title="second" />
Expand Down
2 changes: 2 additions & 0 deletions docs/demo/alternativeLabel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## alternativeLabel
<code src="../examples/alternativeLabel.jsx">
2 changes: 2 additions & 0 deletions docs/demo/composable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## composable
<code src="../examples/composable.jsx">
2 changes: 2 additions & 0 deletions docs/demo/custom-svg-icon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## custom-svg-icon
<code src="../examples/custom-svg-icon.jsx">
2 changes: 2 additions & 0 deletions docs/demo/customIcon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## customIcon
<code src="../examples/customIcon.jsx">
2 changes: 2 additions & 0 deletions docs/demo/dynamic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## dynamic
<code src="../examples/dynamic.jsx">
2 changes: 2 additions & 0 deletions docs/demo/errorStep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## errorStep
<code src="../examples/errorStep.jsx">
2 changes: 2 additions & 0 deletions docs/demo/nav-base.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## nav-base
<code src="../examples/nav-base.jsx">
2 changes: 2 additions & 0 deletions docs/demo/nextStep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## nextStep
<code src="../examples/nextStep.jsx">
2 changes: 2 additions & 0 deletions docs/demo/progressDot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## progressDot
<code src="../examples/progressDot.jsx">
2 changes: 2 additions & 0 deletions docs/demo/simple.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## simple
<code src="../examples/simple.jsx">
2 changes: 2 additions & 0 deletions docs/demo/smallSize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## smallSize
<code src="../examples/smallSize.jsx">
2 changes: 2 additions & 0 deletions docs/demo/stepIcon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## stepIcon
<code src="../examples/stepIcon.jsx">
2 changes: 2 additions & 0 deletions docs/demo/vertical.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## vertical
<code src="../examples/vertical.jsx">
2 changes: 2 additions & 0 deletions docs/demo/verticalSmall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## verticalSmall
<code src="../examples/verticalSmall.jsx">
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../assets/index.less';
import '../assets/iconfont.less';
import '../../assets/index.less';
import '../../assets/iconfont.less';
import React from 'react';
import Steps, { Step } from '../src';
import Steps, { Step } from 'rc-steps';

const description =
'这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊';
Expand Down
6 changes: 3 additions & 3 deletions examples/composable.jsx → docs/examples/composable.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../assets/index.less';
import '../assets/iconfont.less';
import '../../assets/index.less';
import '../../assets/iconfont.less';
import React from 'react';
import Steps, { Step } from '../src';
import Steps, { Step } from 'rc-steps';

const description =
'这里是多信息的描述啊描述啊描述啊描述啊哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../assets/index.less';
import '../assets/iconfont.less';
import '../../assets/index.less';
import '../../assets/iconfont.less';
import React from 'react';
import Steps, { Step } from '../src';
import Steps, { Step } from 'rc-steps';

function getFinishIcon() {
const path =
Expand Down
6 changes: 3 additions & 3 deletions examples/customIcon.jsx → docs/examples/customIcon.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../assets/index.less';
import '../assets/iconfont.less';
import '../../assets/index.less';
import '../../assets/iconfont.less';
import React from 'react';
import Steps, { Step } from '../src';
import Steps, { Step } from 'rc-steps';

// eslint-disable-next-line react/prop-types
const Icon = ({ type }) => <i className={`rcicon rcicon-${type}`} />;
Expand Down
6 changes: 3 additions & 3 deletions examples/dynamic.jsx → docs/examples/dynamic.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../assets/index.less';
import '../assets/iconfont.less';
import '../../assets/index.less';
import '../../assets/iconfont.less';
import React from 'react';
import Steps, { Step } from '../src';
import Steps, { Step } from 'rc-steps';

class App extends React.Component {
state = {
Expand Down
6 changes: 3 additions & 3 deletions examples/errorStep.jsx → docs/examples/errorStep.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../assets/index.less';
import '../assets/iconfont.less';
import '../../assets/index.less';
import '../../assets/iconfont.less';
import React from 'react';
import Steps, { Step } from '../src';
import Steps, { Step } from 'rc-steps';

const description =
'这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊';
Expand Down
6 changes: 3 additions & 3 deletions examples/nav-base.jsx → docs/examples/nav-base.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../assets/index.less';
import '../assets/iconfont.less';
import '../../assets/index.less';
import '../../assets/iconfont.less';
import React from 'react';
import Steps from '../src';
import Steps from 'rc-steps';

const { Step } = Steps;

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions examples/nextStep.jsx → docs/examples/nextStep.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import '../assets/index.less';
import '../assets/iconfont.less';
import '../../assets/index.less';
import '../../assets/iconfont.less';
import './nextStep.css';
import React from 'react';
import Steps, { Step } from '../src';
import Steps, { Step } from 'rc-steps';

const container = document.getElementById('__react-content');

Expand Down
6 changes: 3 additions & 3 deletions examples/progressDot.jsx → docs/examples/progressDot.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../assets/index.less';
import '../assets/iconfont.less';
import '../../assets/index.less';
import '../../assets/iconfont.less';
import React from 'react';
import Steps, { Step } from '../src';
import Steps, { Step } from 'rc-steps';

const description =
'这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊';
Expand Down
6 changes: 3 additions & 3 deletions examples/simple.jsx → docs/examples/simple.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../assets/index.less';
import '../assets/iconfont.less';
import '../../assets/index.less';
import '../../assets/iconfont.less';
import React from 'react';
import Steps, { Step } from '../src';
import Steps, { Step } from 'rc-steps';

const description =
'这里是多信息的描述啊描述啊描述啊描述啊哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶';
Expand Down
6 changes: 3 additions & 3 deletions examples/smallSize.jsx → docs/examples/smallSize.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../assets/index.less';
import '../assets/iconfont.less';
import '../../assets/index.less';
import '../../assets/iconfont.less';
import React from 'react';
import Steps, { Step } from '../src';
import Steps, { Step } from 'rc-steps';

// eslint-disable-next-line react/prop-types
const Icon = ({ type }) => <i className={`rcicon rcicon-${type}`} />;
Expand Down
6 changes: 3 additions & 3 deletions examples/stepIcon.jsx → docs/examples/stepIcon.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../assets/index.less';
import '../assets/iconfont.less';
import '../../assets/index.less';
import '../../assets/iconfont.less';
import React from 'react';
import Steps, { Step } from '../src';
import Steps, { Step } from 'rc-steps';

function stepIcon({ status, node }) {
const isProcessing = status === 'process';
Expand Down
6 changes: 3 additions & 3 deletions examples/vertical.jsx → docs/examples/vertical.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../assets/index.less';
import '../assets/iconfont.less';
import '../../assets/index.less';
import '../../assets/iconfont.less';
import React from 'react';
import Steps, { Step } from '../src';
import Steps, { Step } from 'rc-steps';

const description =
'这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../assets/index.less';
import '../assets/iconfont.less';
import '../../assets/index.less';
import '../../assets/iconfont.less';
import React from 'react';
import Steps, { Step } from '../src';
import Steps, { Step } from 'rc-steps';

const description =
'这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊';
Expand Down
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,9 @@
"url": "http://github.com/react-component/steps/issues"
},
"license": "MIT",
"config": {
"port": 8002
},
"scripts": {
"start": "cross-env NODE_ENV=development father doc dev --storybook",
"build": "father doc build --storybook",
"start": "dumi dev",
"build": "dumi build",
"compile": "father build && lessc assets/index.less assets/index.css",
"gh-pages": "npm run build && father doc deploy",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
Expand All @@ -61,6 +58,7 @@
"@types/react-dom": "^16.9.0",
"@umijs/fabric": "^2.0.9",
"cross-env": "^7.0.0",
"dumi": "^1.1.31",
"enzyme": "^3.1.0",
"enzyme-adapter-react-16": "^1.0.1",
"enzyme-to-json": "^3.1.2",
Expand Down
16 changes: 16 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "esnext",
"moduleResolution": "node",
"baseUrl": "./",
"jsx": "preserve",
"declaration": true,
"skipLibCheck": true,
"esModuleInterop": true,
"paths": {
"@/*": ["src/*"],
"@@/*": ["src/.umi/*"],
"rc-steps": ["src/index.ts"]
}
}
}
Loading

0 comments on commit ee69c7a

Please sign in to comment.