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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ yarn.lock
package-lock.json
coverage/
.doc
# umi
.umi
.umi-production
.umi-test
.env.local
21 changes: 21 additions & 0 deletions .umirc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// more config: https://d.umijs.org/config
import { defineConfig } from 'dumi';

const name = 'textarea';

export default defineConfig({
title: 'rc-textarea',
favicon: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
outputPath: '.doc',
exportStatic: {},
base: `/${name}/`,
publicPath: `/${name}/`,
styles: [
`
.markdown table {
width: auto !important;
}
`,
],
});
File renamed without changes.
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# rc-textarea

[![NPM version][npm-image]][npm-url]
[![npm download][download-image]][download-url]
[![build status][github-actions-image]][github-actions-url]
[![Codecov][codecov-image]][codecov-url]
[![Dependencies][david-image]](david-url)
[![DevDependencies][david-dev-image]][david-dev-url]
[![bundle size][bundlephobia-image]][bundlephobia-url]
[![NPM version][npm-image]][npm-url] [![dumi](https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square)](https://github.com/umijs/dumi) [![npm download][download-image]][download-url] [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![Dependencies][david-image]](david-url) [![DevDependencies][david-dev-image]][david-dev-url] [![bundle size][bundlephobia-image]][bundlephobia-url]

[npm-image]: http://img.shields.io/npm/v/rc-textarea.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rc-textarea
Expand Down
3 changes: 3 additions & 0 deletions docs/demo/autoSize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## autoSize

<code src="../examples/autoSize.jsx" />
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" />
2 changes: 1 addition & 1 deletion examples/autoSize.js → docs/examples/autoSize.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-console */
import React, { useState } from 'react';
import Textarea from '../src/index';
import Textarea from 'rc-textarea';

export default function App() {
const [value, setValue] = useState('hello\nworld');
Expand Down
2 changes: 1 addition & 1 deletion examples/simple.js → docs/examples/simple.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-console */
import React, { useState } from 'react';
import Textarea from '../src/index';
import Textarea from 'rc-textarea';

export default function App() {
const [value, setValue] = useState('');
Expand Down
5 changes: 5 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: rc-textarea
---

<embed src="../README.md"></embed>
1 change: 0 additions & 1 deletion index.js

This file was deleted.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
},
"license": "MIT",
"scripts": {
"start": "cross-env NODE_ENV=development father doc dev --storybook",
"build": "father doc build --storybook",
"start": "dumi dev",
"docs:build": "dumi build",
"docs:deploy": "gh-pages -d .doc",
"compile": "father build && lessc assets/index.less assets/index.css",
"gh-pages": "npm run build && father doc deploy",
"gh-pages": "npm run docs:build && npm run docs:deploy",
"prepublishOnly": "npm run compile && np --yolo --no-publish && npm run gh-pages",
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md",
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
Expand All @@ -53,11 +54,13 @@
"@umijs/fabric": "^2.0.8",
"coveralls": "^3.0.6",
"cross-env": "^7.0.2",
"dumi": "^1.1.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",
"gh-pages": "^3.1.0",
"husky": "^4.2.5",
"less": "^3.10.3",
"np": "^5.1.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { mount } from 'enzyme';
import TextArea from '../index';
import TextArea from '../src';
import { focusTest, sleep } from './utils';
import calculateNodeHeight, {
calculateNodeStyling,
Expand Down
9 changes: 7 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"jsx": "preserve",
"declaration": true,
"skipLibCheck": true,
"esModuleInterop": true
"esModuleInterop": true,
"paths": {
"@/*": ["src/*"],
"@@/*": ["src/.umi/*"],
"rc-textarea": ["src/index.tsx"]
}
}
}
}