Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .fatherrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export default {
entry: ['src/index.js'],
cjs: 'babel',
esm: { type: 'babel', importLibToEs: true },
doc: { base: '/checkbox' },
preCommit: {
eslint: true,
prettier: true,
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ build
lib
es
coverage
yarn.lock
yarn.lock

# dumi
.umi
.umi-production
.umi-test
.docs
8 changes: 8 additions & 0 deletions .umirc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// more config: https://d.umijs.org/config
import { defineConfig } from 'dumi';

export default defineConfig({
title: 'rc-checkbox',
outputPath: '.docs',
exportStatic: {},
});
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Checkbox ui component for react.
[![DevDependencies][david-dev-image]][david-dev-url]
[![npm download][download-image]][download-url]
[![bundle size][bundlephobia-image]][bundlephobia-url]
[![dumi][dumi-image]][dumi-url]

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

## Install

Expand Down
3 changes: 3 additions & 0 deletions docs/demo/simple.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Simple

<code src="../examples/simple.jsx" />
4 changes: 2 additions & 2 deletions examples/simple.jsx → docs/examples/simple.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint no-console:0, jsx-a11y/label-has-for: 0, jsx-a11y/label-has-associated-control: 0 */
import React from 'react';
import Checkbox from '../src';
import '../assets/index.less';
import Checkbox from 'rc-checkbox';
import '../../assets/index.less';

function onChange(e) {
console.log('Checkbox checked:', e.target.checked);
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
},
"license": "MIT",
"scripts": {
"start": "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": "father doc deploy",
"gh-pages": "npm run build && father doc deploy -d .docs",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"lint": "eslint . --ext='jsx'",
"test": "father test",
Expand All @@ -43,6 +43,7 @@
"@types/jest": "^26.0.5",
"@umijs/fabric": "^2.2.2",
"coveralls": "^3.0.6",
"dumi": "^1.1.37",
"enzyme": "^3.0.0",
"enzyme-adapter-react-16": "^1.0.1",
"enzyme-to-json": "^3.0.0",
Expand Down