Skip to content

Commit 98751ea

Browse files
authored
chore: migrate to dumi (#220)
1 parent 22992a5 commit 98751ea

File tree

7 files changed

+27
-7
lines changed

7 files changed

+27
-7
lines changed

.fatherrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ export default {
22
entry: ['src/index.js'],
33
cjs: 'babel',
44
esm: { type: 'babel', importLibToEs: true },
5-
doc: { base: '/checkbox' },
65
preCommit: {
76
eslint: true,
87
prettier: true,

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@ build
2828
lib
2929
es
3030
coverage
31-
yarn.lock
31+
yarn.lock
32+
33+
# dumi
34+
.umi
35+
.umi-production
36+
.umi-test
37+
.docs

.umirc.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// more config: https://d.umijs.org/config
2+
import { defineConfig } from 'dumi';
3+
4+
export default defineConfig({
5+
title: 'rc-checkbox',
6+
outputPath: '.docs',
7+
exportStatic: {},
8+
});

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Checkbox ui component for react.
1111
[![DevDependencies][david-dev-image]][david-dev-url]
1212
[![npm download][download-image]][download-url]
1313
[![bundle size][bundlephobia-image]][bundlephobia-url]
14+
[![dumi][dumi-image]][dumi-url]
1415

1516
[npm-image]: http://img.shields.io/npm/v/rc-checkbox.svg?style=flat-square
1617
[npm-url]: http://npmjs.org/package/rc-checkbox
@@ -28,6 +29,8 @@ Checkbox ui component for react.
2829
[download-url]: https://npmjs.org/package/rc-checkbox
2930
[bundlephobia-url]: https://bundlephobia.com/result?p=rc-checkbox
3031
[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-checkbox
32+
[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square
33+
[dumi-url]: https://github.com/umijs/dumi
3134

3235
## Install
3336

docs/demo/simple.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Simple
2+
3+
<code src="../examples/simple.jsx" />

examples/simple.jsx renamed to docs/examples/simple.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint no-console:0, jsx-a11y/label-has-for: 0, jsx-a11y/label-has-associated-control: 0 */
22
import React from 'react';
3-
import Checkbox from '../src';
4-
import '../assets/index.less';
3+
import Checkbox from 'rc-checkbox';
4+
import '../../assets/index.less';
55

66
function onChange(e) {
77
console.log('Checkbox checked:', e.target.checked);

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
},
2626
"license": "MIT",
2727
"scripts": {
28-
"start": "father doc dev --storybook",
29-
"build": "father doc build --storybook",
28+
"start": "dumi dev",
29+
"build": "dumi build",
3030
"compile": "father build && lessc assets/index.less assets/index.css",
31-
"gh-pages": "father doc deploy",
31+
"gh-pages": "npm run build && father doc deploy -d .docs",
3232
"prepublishOnly": "npm run compile && np --yolo --no-publish",
3333
"lint": "eslint . --ext='jsx'",
3434
"test": "father test",
@@ -43,6 +43,7 @@
4343
"@types/jest": "^26.0.5",
4444
"@umijs/fabric": "^2.2.2",
4545
"coveralls": "^3.0.6",
46+
"dumi": "^1.1.37",
4647
"enzyme": "^3.0.0",
4748
"enzyme-adapter-react-16": "^1.0.1",
4849
"enzyme-to-json": "^3.0.0",

0 commit comments

Comments
 (0)