-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from Donaldcwl/dev
Release 1.0.15
- Loading branch information
Showing
42 changed files
with
4,121 additions
and
7,475 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
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,16 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
}, | ||
extends: [ | ||
'airbnb-base', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 12, | ||
sourceType: 'module', | ||
}, | ||
rules: { | ||
'max-len': ['warn', { code: 150 }], | ||
}, | ||
ignorePatterns: ['dist'], | ||
}; |
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ yarn add browser-image-compression | |
``` | ||
or use a CDN like [delivrjs]: | ||
``` | ||
https://cdn.jsdelivr.net/npm/[email protected].14/dist/browser-image-compression.js | ||
https://cdn.jsdelivr.net/npm/[email protected].15/dist/browser-image-compression.js | ||
or | ||
https://cdn.jsdelivr.net/npm/browser-image-compression@latest/dist/browser-image-compression.js | ||
``` | ||
|
@@ -42,7 +42,7 @@ or | |
|
||
#### In html file #### | ||
```html | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].14/dist/browser-image-compression.js"></script> | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].15/dist/browser-image-compression.js"></script> | ||
``` | ||
|
||
## API ## | ||
|
@@ -153,16 +153,6 @@ or check the "[example]" folder in this repo | |
## Remarks for compression to work in Web Worker | ||
The browser need to support "OffscreenCanvas" API in order to take advantage of non-blocking compression. If browser do not support "OffscreenCanvas" API, main thread is used instead. See https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas#browser_compatibility for browser compatibility of "OffscreenCanvas" API. | ||
|
||
## IE support ## | ||
Promise API is being used in this library. If you need to support browser that do not support Promise like IE. You can include the Promise polyfill in your project. | ||
|
||
See: https://github.com/taylorhakes/promise-polyfill | ||
|
||
You can include the following script to load the Promise polyfill: | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js"></script> | ||
``` | ||
|
||
## Typescript type definitions ## | ||
Typescript definitions are included in the package & referenced in the `types` section of the `package.json` | ||
|
||
|
@@ -174,7 +164,7 @@ Typescript definitions are included in the package & referenced in the `types` s | |
5. add/update test in test/ folder | ||
6. `npm run test` | ||
7. push to your forked repo on github | ||
8. make a pull request to this repo | ||
8. make a pull request to dev branch of this repo | ||
|
||
[dist]: https://github.com/Donaldcwl/browser-image-compression/tree/master/dist | ||
[example]: https://github.com/Donaldcwl/browser-image-compression/tree/master/example | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.