Skip to content

Commit ffb4686

Browse files
donaldshenlevy9527
authored andcommitted
docs: update README badges & contributing (#79)
1 parent 62f208b commit ffb4686

File tree

8 files changed

+102
-43
lines changed

8 files changed

+102
-43
lines changed

.github/badge.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
types:
22
feat: 'enhancement'
3-
fix: 'bug'
3+
fix:
4+
hack: 'hack'
5+
default: 'bug'
6+
hack: 'hack'
47
docs: 'documentation'
58
refactor: 'refactor'
9+
style: 'style'
610
test: 'test'
711
perf: 'performance'
812
chore:

.grenrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module.exports = {
2525
'♻️ Tests:': ['test'],
2626
'🚀 Performance:': ['performance'],
2727
'⚓ Dependency upgrades:': ['dependencies'],
28-
'🏡 Chore:': ['chore']
28+
'🏡 Chore:': ['chore'],
29+
'💄 Style:': ['style'],
30+
'🎩 Hack': ['hack']
2931
}
3032
}

.stylelintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "stylelint-config-standard",
3+
"rules": {
4+
"no-empty-source": null
5+
}
6+
}

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ git:
88
depth: 3
99
install:
1010
- yarn --frozen-lockfile
11+
- yarn test
1112
before_script:
1213
- echo OSS_KEY=$OSS_KEY >> .env
1314
- echo OSS_SECRET=$OSS_SECRET >> .env

README-en.md

Lines changed: 50 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# upload-to-ali
22

3-
![](https://cdn.nlark.com/yuque/0/2019/svg/224563/1561711810492-144f830f-091b-4881-beb7-98caed3c66f7.svg#align=left&display=inline&height=20&originHeight=20&originWidth=90&size=0&status=done&width=90) [![](https://img.shields.io/npm/dm/@femessage/upload-to-ali.svg#align=left&display=inline&height=20&originHeight=20&originWidth=140&status=done&width=140)](https://www.npmjs.com/package/@femessage/upload-to-ali) ![](https://img.shields.io/npm/v/@femessage/upload-to-ali.svg#align=left&display=inline&height=20&originHeight=20&originWidth=80&status=done&width=80) [![](https://img.shields.io/npm/l/@femessage/upload-to-ali.svg#align=left&display=inline&height=20&originHeight=20&originWidth=78&status=done&width=78)](https://github.com/FEMessage/upload-to-ali/blob/master/LICENSE) ![](https://img.shields.io/badge/PRs-welcome-brightgreen.svg#align=left&display=inline&height=20&originHeight=20&originWidth=90&status=done&width=90) [![](https://img.shields.io/badge/%F0%9F%A4%96-release%20notes-00B2EE.svg#align=left&display=inline&height=20&originHeight=20&originWidth=104&status=done&width=104)](https://github-tools.github.io/github-release-notes/)
3+
[![Build Status](https://badgen.net/travis/FEMessage/upload-to-ali/master)](https://travis-ci.com/FEMessage/upload-to-ali)
4+
[![NPM Download](https://badgen.net/npm/dm/@femessage/upload-to-ali)](https://www.npmjs.com/package/@femessage/upload-to-ali)
5+
[![NPM Version](https://badgen.net/npm/v/@femessage/upload-to-ali)](https://www.npmjs.com/package/@femessage/upload-to-ali)
6+
[![NPM License](https://badgen.net/npm/license/@femessage/upload-to-ali)](https://github.com/FEMessage/upload-to-ali/blob/master/LICENSE)
7+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/FEMessage/upload-to-ali/pulls)
8+
[![Automated Release Notes by gren](https://img.shields.io/badge/%F0%9F%A4%96-release%20notes-00B2EE.svg)](https://github-tools.github.io/github-release-notes/)
49

510
This component can upload file to Aliyun-OSS easily.
611

@@ -11,53 +16,53 @@ You can configure OSS information through environmental variables, customize dom
1116
## Table of Contents
1217

1318
* [Feature](#feature)
14-
* [Documentation](#documentation)
19+
* [Links](#links)
1520
* [Install](#install)
1621
* [Config](#config)
1722
* [Dotenv](#dotenv)
23+
* [Contributing](#contributing)
1824
* [Contributors](#contributors)
25+
* [License](#license)
1926

2027
## Feature
2128

2229
* Pure front-end implementation, no need for backend cooperation
23-
* The upload function can be done with little oss configuration
30+
* The upload function can be done with little oss configuration
2431
* Automatically compress pictures before uploading, and loading prompts during uploading, support picture display and deletion
25-
* With default styles and support customize
32+
* With default styles and support customize
2633
* Can limit the size or the number of files to upload
2734
* Support paste screenshot to upload
28-
* Can drag and drop to upload
35+
* Can drag and drop to upload
2936
* Can preivew img
3037

31-
**[⬆Back to Top](#table-of-contents)**
38+
[⬆Back to Top](#table-of-contents)
3239

40+
## Links
3341

34-
## Documentation
35-
36-
* [Doc And Online Demo](https://femessage.github.io/upload-to-ali/)
37-
38-
**[⬆Back to Top](#table-of-contents)**
42+
* [docs](https://FEMessage.github.io/upload-to-ali/)
43+
* [ali oss guide](docs/ali-oss-guide.md)
3944

45+
[⬆ Back to Top](#table-of-contents)
4046

4147
## Install
4248

4349
```bash
4450
yarn add @femessage/upload-to-ali
4551
```
4652

47-
**[⬆Back to Top](#table-of-contents)**
48-
53+
[⬆Back to Top](#table-of-contents)
4954

5055
## Config
5156

5257
The following props are required:`accessKeyId` - Created by Alibaba Cloud Console `accessKeyId`<br />`accessKeySecret` - Created by Alibaba Cloud Console `accessKeySecret`<br />`bucket` - Storage space name<br />`region` - Alibaba Cloud area name
5358

5459
[Be sure to set cross-domain and ACL before using](https://help.aliyun.com/document_detail/32069.html?spm=a2c4g.11186623.6.920.9ddd5557vJ6QU7)
5560

56-
**[⬆Back to Top](#table-of-contents)**
61+
[⬆Back to Top](#table-of-contents)
5762

5863
## Dotenv
5964

60-
Recommend using environment variables to configure OSS parameters<br />With dotenv, we just need to write the environment variable in `.env`. With CI tools, this can meet the needs of using different OSS in different environments without change the source code.<br />Here are all can passed-in environment variables
65+
Recommend using environment variables to configure OSS parameters<br />With dotenv, we just need to write the environment variable in `.env`. With CI tools, this can meet the needs of using different OSS in different environments without change the source code.<br />Here are all can passed-in environment variables
6166

6267
```sh
6368
# .env文件
@@ -68,22 +73,46 @@ OSS_KEY=xxx
6873
OSS_SECRET=xxx
6974
# required
7075
OSS_BUCKET=your-bucket
71-
# required
76+
# required
7277
OSS_REGION=oss-cn-beijing
73-
# optional
78+
# optional
7479
OSS_DIR=oss-dir
75-
# optional
80+
# optional
7681
OSS_CUSTOM_DOMAIN=cdn.xxx.com
7782
```
7883

7984
`dotenv` document reference [https://www.npmjs.com/package/dotenv](https://www.npmjs.com/package/dotenv)
8085

81-
**[⬆Back to Top](#table-of-contents)**
86+
[⬆Back to Top](#table-of-contents)
87+
88+
## Contributing
89+
90+
For those who are interested in contributing to this project, such as:
91+
92+
* report a bug
93+
* request new feature
94+
* fix a bug
95+
* implement a new feature
96+
97+
Please refer to our [contributing guide](https://github.com/FEMessage/.github/blob/master/CONTRIBUTING.md).
98+
99+
[⬆ Back to Top](#table-of-contents)
82100

83101
## Contributors
84102

85103
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
86104

87-
| [![](https://avatars3.githubusercontent.com/u/9384365?v=4#alt=levy&width=100)<br />**levy**](http://levy.work)<br />[💻](https://github.com/FEMessage/upload-to-ali/commits?author=levy9527) [👀](#review-levy9527) [🚇](#infra-levy9527) [📝](#blog-levy9527) [🤔](#ideas-levy9527) | [![](https://avatars0.githubusercontent.com/u/11909145?v=4#alt=Alvin&width=100)<br />**Alvin**](https://github.com/Alvin-Liu)<br />[💻](https://github.com/FEMessage/upload-to-ali/commits?author=Alvin-Liu) [👀](#review-Alvin-Liu) | [![](https://avatars2.githubusercontent.com/u/20613509?v=4#alt=listars&width=100)<br />**listars**](https://github.com/listars)<br />[💻](https://github.com/FEMessage/upload-to-ali/commits?author=listars) [👀](#review-listars) [📖](https://github.com/FEMessage/upload-to-ali/commits?author=listars) | [![](https://avatars3.githubusercontent.com/u/19513289?v=4#alt=EVILLT&width=100)<br />**EVILLT**](https://evila.me)<br />[💻](https://github.com/FEMessage/upload-to-ali/commits?author=evillt) [📖](https://github.com/FEMessage/upload-to-ali/commits?author=evillt) |
88-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
105+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
106+
107+
<!-- prettier-ignore -->
108+
<table><tr><td align="center"><a href="http://levy.work"><img src="https://avatars3.githubusercontent.com/u/9384365?v=4" width="100px;" alt="levy"/><br /><sub><b>levy</b></sub></a><br /><a href="https://github.com/FEMessage/upload-to-ali/commits?author=levy9527" title="Code">💻</a> <a href="#review-levy9527" title="Reviewed Pull Requests">👀</a> <a href="#infra-levy9527" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#blog-levy9527" title="Blogposts">📝</a> <a href="#ideas-levy9527" title="Ideas, Planning, & Feedback">🤔</a></td><td align="center"><a href="https://github.com/Alvin-Liu"><img src="https://avatars0.githubusercontent.com/u/11909145?v=4" width="100px;" alt="Alvin"/><br /><sub><b>Alvin</b></sub></a><br /><a href="https://github.com/FEMessage/upload-to-ali/commits?author=Alvin-Liu" title="Code">💻</a> <a href="#review-Alvin-Liu" title="Reviewed Pull Requests">👀</a></td><td align="center"><a href="https://github.com/listars"><img src="https://avatars2.githubusercontent.com/u/20613509?v=4" width="100px;" alt="listars"/><br /><sub><b>listars</b></sub></a><br /><a href="https://github.com/FEMessage/upload-to-ali/commits?author=listars" title="Code">💻</a> <a href="#review-listars" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/FEMessage/upload-to-ali/commits?author=listars" title="Documentation">📖</a></td><td align="center"><a href="https://evila.me"><img src="https://avatars3.githubusercontent.com/u/19513289?v=4" width="100px;" alt="EVILLT"/><br /><sub><b>EVILLT</b></sub></a><br /><a href="https://github.com/FEMessage/upload-to-ali/commits?author=evillt" title="Code">💻</a> <a href="https://github.com/FEMessage/upload-to-ali/commits?author=evillt" title="Documentation">📖</a></td><td align="center"><a href="https://donaldshen.github.io/portfolio"><img src="https://avatars3.githubusercontent.com/u/19591950?v=4" width="100px;" alt="Donald Shen"/><br /><sub><b>Donald Shen</b></sub></a><br /><a href="https://github.com/FEMessage/upload-to-ali/commits?author=donaldshen" title="Code">💻</a> <a href="https://github.com/FEMessage/upload-to-ali/commits?author=donaldshen" title="Documentation">📖</a></td><td align="center"><a href="http://67.216.223.155/resume/"><img src="https://avatars3.githubusercontent.com/u/26338853?v=4" width="100px;" alt="OuZuYu"/><br /><sub><b>OuZuYu</b></sub></a><br /><a href="https://github.com/FEMessage/upload-to-ali/issues?q=author%3AOuZuYu" title="Bug reports">🐛</a></td><td align="center"><a href="https://justcodeit.fun"><img src="https://avatars1.githubusercontent.com/u/18013127?v=4" width="100px;" alt="轻剑快马"/><br /><sub><b>轻剑快马</b></sub></a><br /><a href="https://github.com/FEMessage/upload-to-ali/commits?author=xrr2016" title="Documentation">📖</a></td></tr><tr><td align="center"><a href="https://colmugx.github.io"><img src="https://avatars1.githubusercontent.com/u/21327913?v=4" width="100px;" alt="ColMugX"/><br /><sub><b>ColMugX</b></sub></a><br /><a href="https://github.com/FEMessage/upload-to-ali/issues?q=author%3Acolmugx" title="Bug reports">🐛</a></td><td align="center"><a href="https://rexer.wang"><img src="https://avatars2.githubusercontent.com/u/15629940?v=4" width="100px;" alt="Rexer Wang"/><br /><sub><b>Rexer Wang</b></sub></a><br /><a href="https://github.com/FEMessage/upload-to-ali/issues?q=author%3Arexerwang" title="Bug reports">🐛</a></td></tr></table>
109+
110+
<!-- ALL-CONTRIBUTORS-LIST:END -->
111+
112+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
113+
114+
## License
115+
116+
[MIT](./LICENSE)
89117

118+
[⬆ Back to Top](#table-of-contents)

README.md

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# upload-to-ali
22

3-
[![Build Status](https://travis-ci.com/FEMessage/upload-to-ali.svg?branch=master)](https://travis-ci.com/FEMessage/upload-to-ali)
4-
[![NPM Download](https://img.shields.io/npm/dm/@femessage/upload-to-ali.svg)](https://www.npmjs.com/package/@femessage/upload-to-ali)
5-
[![NPM Version](https://img.shields.io/npm/v/@femessage/upload-to-ali.svg)](https://www.npmjs.com/package/@femessage/upload-to-ali)
6-
[![NPM License](https://img.shields.io/npm/l/@femessage/upload-to-ali.svg)](https://github.com/FEMessage/upload-to-ali/blob/master/LICENSE)
3+
[![Build Status](https://badgen.net/travis/FEMessage/upload-to-ali/master)](https://travis-ci.com/FEMessage/upload-to-ali)
4+
[![NPM Download](https://badgen.net/npm/dm/@femessage/upload-to-ali)](https://www.npmjs.com/package/@femessage/upload-to-ali)
5+
[![NPM Version](https://badgen.net/npm/v/@femessage/upload-to-ali)](https://www.npmjs.com/package/@femessage/upload-to-ali)
6+
[![NPM License](https://badgen.net/npm/license/@femessage/upload-to-ali)](https://github.com/FEMessage/upload-to-ali/blob/master/LICENSE)
77
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/FEMessage/upload-to-ali/pulls)
88
[![Automated Release Notes by gren](https://img.shields.io/badge/%F0%9F%A4%96-release%20notes-00B2EE.svg)](https://github-tools.github.io/github-release-notes/)
99

@@ -13,15 +13,16 @@
1313

1414
[English](./README-en.md)
1515

16-
## Table of Contents <!-- omit in toc -->
16+
## Table of Contents
1717

1818
* [Feature](#feature)
19-
* [Documentation](#documentation)
19+
* [Links](#links)
2020
* [Install](#install)
2121
* [Config](#config)
2222
* [Dotenv](#dotenv)
23-
* [Reference](#reference)
23+
* [Contributing](#contributing)
2424
* [Contributors](#contributors)
25+
* [License](#license)
2526

2627
## Feature
2728

@@ -34,21 +35,22 @@
3435
* 可拖拽上传
3536
* 可预览图片
3637

37-
**[⬆ Back to Top](#table-of-contents)**
38+
[⬆ Back to Top](#table-of-contents)
3839

39-
## Documentation
40+
## Links
4041

41-
* [Doc And Online Demo](https://femessage.github.io/upload-to-ali/)
42+
* [docs](https://FEMessage.github.io/upload-to-ali/)
43+
* [ali oss guide](docs/ali-oss-guide.md)
4244

43-
**[⬆ Back to Top](#table-of-contents)**
45+
[⬆ Back to Top](#table-of-contents)
4446

4547
## Install
4648

4749
```sh
4850
yarn add @femessage/upload-to-ali
4951
```
5052

51-
**[⬆ Back to Top](#table-of-contents)**
53+
[⬆ Back to Top](#table-of-contents)
5254

5355
## Config
5456

@@ -64,7 +66,7 @@ yarn add @femessage/upload-to-ali
6466

6567
[使用前请务必设置跨域 及 ACL](https://help.aliyun.com/document_detail/32069.html?spm=a2c4g.11186623.6.920.9ddd5557vJ6QU7)
6668

67-
**[⬆ Back to Top](#table-of-contents)**
69+
[⬆ Back to Top](#table-of-contents)
6870

6971
## Dotenv
7072

@@ -94,11 +96,20 @@ OSS_CUSTOM_DOMAIN=cdn.xxx.com
9496

9597
`dotenv` 文档参考 https://www.npmjs.com/package/dotenv
9698

97-
**[⬆ Back to Top](#table-of-contents)**
99+
[⬆ Back to Top](#table-of-contents)
98100

99-
## Reference
101+
## Contributing
100102

101-
* [ali oss guide](docs/ali-oss-guide.md)
103+
For those who are interested in contributing to this project, such as:
104+
105+
* report a bug
106+
* request new feature
107+
* fix a bug
108+
* implement a new feature
109+
110+
Please refer to our [contributing guide](https://github.com/FEMessage/.github/blob/master/CONTRIBUTING.md).
111+
112+
[⬆ Back to Top](#table-of-contents)
102113

103114
## Contributors
104115

@@ -112,3 +123,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
112123
<!-- ALL-CONTRIBUTORS-LIST:END -->
113124

114125
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
126+
127+
## License
128+
129+
[MIT](./LICENSE)
130+
131+
[⬆ Back to Top](#table-of-contents)

notify.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ resp_tmp_file=resp.tmp
1010

1111
curl -H "Authorization: token $GITHUB_TOKEN" $url > $resp_tmp_file
1212

13-
html_url=`cat $resp_tmp_file | sed -n 5p | sed 's/\"html_url\"://g' | awk -F '"' '{print $2}'`
14-
body=`cat $resp_tmp_file | grep body | sed 's/\"body\"://g;s/\"//g'`
13+
html_url=$(sed -n 5p $resp_tmp_file | sed 's/\"html_url\"://g' | awk -F '"' '{print $2}')
14+
body=$(grep body < $resp_tmp_file | sed 's/\"body\"://g;s/\"//g')
1515

1616
msg='{"msgtype": "markdown", "markdown": {"title": "upload-to-ali更新", "text": "@所有人\n# [upload-to-ali]('$html_url')\n'$body'"}}'
1717

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"url": "https://github.com/FEMessage/upload-to-ali.git"
1010
},
1111
"keywords": ["vue", "sfc", "component"],
12-
"files": ["src", "dist", "yarn.lock"],
12+
"files": ["src", "dist"],
1313
"main": "dist/upload-to-ali.umd.js",
1414
"module": "dist/upload-to-ali.esm.js",
1515
"unpkg": "dist/upload-to-ali.min.js",
@@ -63,7 +63,7 @@
6363
"publishConfig": {
6464
"access": "public"
6565
},
66-
"vue-sfc-cli": "1.10.1",
66+
"vue-sfc-cli": "1.10.6",
6767
"engines": {
6868
"node": ">= 4.0.0",
6969
"npm": ">= 3.0.0"

0 commit comments

Comments
 (0)