Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
calimanco committed Jan 20, 2021
1 parent bef21c5 commit 1e4fd9d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ npm install promise-polyfill-plus --save
```javascript
import PromisePlus from 'promise-polyfill-plus'
// or
const PromisePlus = require('promise-polyfill-plus')
const PromisePlus = require('promise-polyfill-plus').default

new PromisePlus((resolve, reject) => {
if (true) {
Expand All @@ -53,7 +53,15 @@ import 'promise-polyfill-plus/auto'
require('promise-polyfill-plus/auto')
```

如果你想
如果你想直接在 HTML 中使用,请到 Github Releases 页面下载最新版本的 JS 文件,有压缩和未压缩两个版本以供选择。
下面示例仅供参考,生产环境不建议直接用下载链接。

```html
<!--Uncompressed version-->
<scirpt src='https://github.com/calimanco/promise-polyfill-plus/releases/download/v1.5.1/promise-polyfill-plus.umd.auto.js'></scirpt>
<!--Compressed version-->
<scirpt src='https://github.com/calimanco/promise-polyfill-plus/releases/download/v1.5.1/promise-polyfill-plus.umd.auto.min.js'></scirpt>
```

## 特性

Expand Down
12 changes: 11 additions & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import to the code directly.
```javascript
import PromisePlus from 'promise-polyfill-plus'
// or
const PromisePlus = require('promise-polyfill-plus')
const PromisePlus = require('promise-polyfill-plus').default

new PromisePlus((resolve, reject) => {
if (true) {
Expand All @@ -53,6 +53,16 @@ import 'promise-polyfill-plus/auto'
require('promise-polyfill-plus/auto')
```

If you want to use it directly in HTML, please go to the Github Releases page to download the latest version of the JS file. There are supplying two versions, compressed and uncompressed.
The following example is for reference only. It is not recommended using the download link directly in the production environment.

```html
<!--Uncompressed version-->
<scirpt src='https://github.com/calimanco/promise-polyfill-plus/releases/download/v1.5.1/promise-polyfill-plus.umd.auto.js'></scirpt>
<!--Compressed version-->
<scirpt src='https://github.com/calimanco/promise-polyfill-plus/releases/download/v1.5.1/promise-polyfill-plus.umd.auto.min.js'></scirpt>
```

## Features

- The instance follows the standard of Promise A+, also implements the common but nonstandard catch and finally methods.
Expand Down

0 comments on commit 1e4fd9d

Please sign in to comment.