-
-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: init * fix: types * docs: update docs * chore: fix type * chore: clean up * test: init * test: js -> ts * test: part * test: part * test: part * chore: rest of it * chore: bump types * test: fixed
- Loading branch information
Showing
22 changed files
with
280 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { defineConfig } from 'dumi'; | ||
import path from 'path'; | ||
|
||
export default defineConfig({ | ||
alias: { | ||
'rc-upload$': path.resolve('src'), | ||
'rc-upload/es': path.resolve('src'), | ||
}, | ||
mfsu: false, | ||
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'], | ||
themeConfig: { | ||
name: 'Upload', | ||
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
export default { | ||
cjs: "babel", | ||
esm: { type: "babel", importLibToEs: true }, | ||
preCommit: { | ||
eslint: true, | ||
prettier: true, | ||
}, | ||
runtimeHelpers: true, | ||
}; | ||
import { defineConfig } from 'father'; | ||
|
||
export default defineConfig({ | ||
plugins: ['@rc-component/father-plugin'], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,7 @@ tmp/ | |
.umi-production | ||
.umi-test | ||
.env.local | ||
|
||
# dumi | ||
.dumi/tmp | ||
.dumi/tmp-production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## asyncAction | ||
--- | ||
title: asyncAction | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/asyncAction.tsx"> | ||
<code src="../examples/asyncAction.tsx"/></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## beforeUpload | ||
--- | ||
title: beforeUpload | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/beforeUpload.tsx"> | ||
<code src="../examples/beforeUpload.tsx"/></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## customRequest | ||
--- | ||
title: customRequest | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/customRequest.tsx"> | ||
<code src="../examples/customRequest.tsx"/></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## directoryUpload | ||
--- | ||
title: directoryUpload | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/directoryUpload.tsx"> | ||
<code src="../examples/directoryUpload.tsx"/></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## drag | ||
--- | ||
title: drag | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/drag.tsx"> | ||
<code src="../examples/drag.tsx"/></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## simple | ||
--- | ||
title: simple | ||
nav: | ||
title: Demo | ||
path: /demo | ||
--- | ||
|
||
<code src="../examples/simple.tsx"> | ||
<code src="../examples/simple.tsx"/></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: rc-trigger | ||
--- | ||
|
||
<embed src="../README.md"></embed> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,78 +9,66 @@ | |
"upload" | ||
], | ||
"homepage": "http://github.com/react-component/upload", | ||
"bugs": { | ||
"url": "http://github.com/react-component/upload/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:react-component/upload.git" | ||
}, | ||
"bugs": { | ||
"url": "http://github.com/react-component/upload/issues" | ||
}, | ||
"license": "MIT", | ||
"main": "./lib/index", | ||
"module": "./es/index", | ||
"files": [ | ||
"lib", | ||
"es" | ||
], | ||
"main": "./lib/index", | ||
"module": "./es/index", | ||
"scripts": { | ||
"start": "dumi dev", | ||
"compile": "father build", | ||
"coverage": "rc-test --coverage", | ||
"docs:build": "dumi build", | ||
"docs:deploy": "npm run docs:build && gh-pages -d .doc", | ||
"compile": "father build", | ||
"prepublishOnly": "npm run compile && np --yolo --no-publish", | ||
"postpublish": "npm run docs:deploy", | ||
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md", | ||
"now-build": "npm run docs:build", | ||
"prepublishOnly": "npm run compile && np --yolo --no-publish", | ||
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"", | ||
"test": "father test", | ||
"coverage": "father test --coverage", | ||
"now-build": "npm run docs:build" | ||
"postpublish": "npm run docs:deploy", | ||
"start": "dumi dev", | ||
"test": "rc-test" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.18.3", | ||
"classnames": "^2.2.5", | ||
"rc-util": "^5.2.0" | ||
}, | ||
"devDependencies": { | ||
"@types/enzyme": "^3.10.8", | ||
"@types/jest": "^26.0.20", | ||
"@types/react": "^17.0.15", | ||
"@types/react-dom": "^17.0.9", | ||
"@rc-component/father-plugin": "^1.0.0", | ||
"@testing-library/jest-dom": "^6.1.5", | ||
"@testing-library/react": "^14.1.2", | ||
"@types/jest": "^29.5.11", | ||
"@types/react": "^18.0.0", | ||
"@types/react-dom": "^18.0.0", | ||
"@umijs/fabric": "^2.0.0", | ||
"axios": "^0.26.1", | ||
"co-busboy": "^1.3.0", | ||
"coveralls": "^3.0.3", | ||
"cross-env": "^7.0.0", | ||
"dumi": "^1.0.37", | ||
"enzyme": "^3.1.1", | ||
"enzyme-adapter-react-16": "^1.0.1", | ||
"enzyme-to-json": "^3.1.2", | ||
"dumi": "^2.1.0", | ||
"eslint": "^7.1.0", | ||
"father": "^2.22.0", | ||
"father": "^4.0.0", | ||
"fs-extra": "^9.0.0", | ||
"gh-pages": "^3.1.0", | ||
"np": "^7.0.0", | ||
"raf": "^3.4.0", | ||
"rc-test": "^7.0.13", | ||
"rc-tools": "8.x", | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0", | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0", | ||
"regenerator-runtime": "^0.13.7", | ||
"sinon": "^9.0.2", | ||
"typescript": "^4.0.2", | ||
"vinyl-fs": "^3.0.3" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.18.3", | ||
"classnames": "^2.2.5", | ||
"rc-util": "^5.2.0" | ||
}, | ||
"jest": { | ||
"collectCoverageFrom": [ | ||
"src/*" | ||
], | ||
"coveragePathIgnorePatterns": [ | ||
"src/IframeUploader.jsx" | ||
], | ||
"transform": { | ||
"\\.tsx?$": "./node_modules/rc-tools/scripts/jestPreprocessor.js", | ||
"\\.jsx?$": "./node_modules/rc-tools/scripts/jestPreprocessor.js" | ||
} | ||
}, | ||
"peerDependencies": { | ||
"react": ">=16.9.0", | ||
"react-dom": ">=16.9.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import type { UploadProps } from './interface'; | ||
import Upload from './Upload'; | ||
import { UploadProps } from './interface'; | ||
|
||
export { UploadProps }; | ||
export type { UploadProps }; | ||
|
||
export default Upload; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
5bfa1a5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
upload – ./
upload-bay.vercel.app
upload-react-component.vercel.app
upload-git-master-react-component.vercel.app