Skip to content

Commit

Permalink
docs: fix grammar errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuanchen committed Aug 6, 2021
1 parent 5f4c9a3 commit b6993fb
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
We are committed to making participation in this project a harassment-free experience for everyone, regardless of the level of experience, gender, gender identity, and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

Expand Down
53 changes: 32 additions & 21 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,24 @@
We would love for you to contribute to Compressor.js and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow:

- [Code of Conduct](#code-of-conduct)
- [Question or Problem](#question-or-problem)
- [Issues and Bugs](#issues-and-bugs)
- [Feature Requests](#feature-requests)
- [Submission Guidelines](#submission-guidelines)
- [Coding Rules](#coding-rules)
- [Commit Message Guidelines](#commit-message-guidelines)
- [Contributing to Compressor.js](#contributing-to-compressorjs)
- [Code of Conduct](#code-of-conduct)
- [Question or Problem](#question-or-problem)
- [Issues and Bugs](#issues-and-bugs)
- [Feature Requests](#feature-requests)
- [Submission Guidelines](#submission-guidelines)
- [Submitting an Issue](#submitting-an-issue)
- [Submitting a Pull Request (PR)](#submitting-a-pull-request-pr)
- [After your pull request is merged](#after-your-pull-request-is-merged)
- [Coding Rules](#coding-rules)
- [Commit Message Guidelines](#commit-message-guidelines)
- [Commit Message Format](#commit-message-format)
- [Revert](#revert)
- [Type](#type)
- [Scope](#scope)
- [Subject](#subject)
- [Body](#body)
- [Footer](#footer)

## Code of Conduct

Expand All @@ -23,10 +34,10 @@ Do not open issues for general support questions as we want to keep GitHub issue
Stack Overflow is a much better place to ask questions since:

- There are thousands of people willing to help on Stack Overflow.
- Questions and answers stay available for public viewing so your question / answer might help someone else.
- Questions and answers stay available for public viewing so your question/answer might help someone else.
- Stack Overflow's voting system assures that the best answers are prominently visible.

To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow.
To save you and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow.

## Issues and Bugs

Expand All @@ -38,26 +49,26 @@ You can *request* a new feature by [submitting an issue](#submitting-an-issue) t

Please consider what kind of change it is:

- For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
- For a **Major Feature**, first, open an issue and outline your proposal so that it can be discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
- **Small Features** can be crafted and directly [submitted as a Pull Request](#submitting-a-pull-request-pr).

## Submission Guidelines

### Submitting an Issue

Before you submit an issue, please search the [issue tracker](https://github.com/fengyuanchen/compressorjs/issues), maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
Before you submit an issue, please search the [issue tracker](https://github.com/fengyuanchen/compressorjs/issues), which may be an issue for your problem already exists and the discussion might inform you of workarounds readily available.

We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs we will systematically ask you to provide a minimal reproduction scenario using [CodePen](https://codepen.io/pen). Having a live, reproducible scenario gives us wealth of important information without going back & forth to you with additional questions like:
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. To reproduce bugs, we will systematically ask you to provide a minimal reproduction scenario using [CodePen](https://codepen.io/pen). Having a live, reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions like:

- version of Compressor.js used
- 3rd-party libraries and their versions
- and most importantly - a use-case that fails

A minimal reproduce scenario using [CodePen](https://codepen.io/pen) allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem. If [CodePen](https://codepen.io/pen) is not a suitable way to demonstrate the problem (for example for issues related to our npm packaging), please create a standalone git repository demonstrating the problem.
A minimal reproduction scenario using [CodePen](https://codepen.io/pen) allows us to quickly confirm a bug (or point out a coding problem) as well as confirm that we are fixing the right problem. If [CodePen](https://codepen.io/pen) is not a suitable way to demonstrate the problem (for example for issues related to our npm packaging), please create a standalone git repository demonstrating the problem.

We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal reproduce scenario. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
We will be insisting on a minimal reproduction scenario to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal reproduction scenario. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we need to isolate the problem before we can fix it.

Unfortunately we are not able to investigate / fix bugs without a minimal reproduce scenario, so if we don't hear back from you we are going to close an issue that don't have enough info to be reproduced.
Unfortunately, we are not able to investigate/fix bugs without a minimal reproduction scenario, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.

You can file new issues by filling out our [new issue form](https://github.com/fengyuanchen/compressorjs/issues/new).

Expand All @@ -82,7 +93,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
git commit -a
```

Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
Note: the optional commit `-a` command-line option will automatically "add" and "rm" edited files.
1. Push your branch to GitHub:

```shell
Expand Down Expand Up @@ -154,15 +165,15 @@ A commit message consists of a **header**, **body** and **footer**. The header h

The **header** is mandatory and the **scope** of the header is optional.

Any line of the commit message cannot be longer 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.
Any line of the commit message cannot be longer than 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.

The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.

Here are some [samples](https://github.com/fengyuanchen/compressorjs/commits/main).

### Revert

If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.

### Type

Expand All @@ -180,14 +191,14 @@ Must be one of the following:

### Scope

The scope could be anything specifying place of the commit change. For example `move`, `zoom`, `rotate`, etc...
The scope could be anything specifying the place of the commit change. For example `move`, `zoom`, `rotate`, etc...

### Subject

The subject contains succinct description of the change:
The subject contains a succinct description of the change:

- Use the imperative, present tense: "change" not "changed" nor "changes".
- Don't capitalize first letter.
- Don't capitalize the first letter.
- No dot (.) at the end.
### Body
Expand Down
53 changes: 30 additions & 23 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,47 @@
## PR Checklist
<!-- Please don't delete this template -->

Please check if your PR fulfills the following requirements:
<!-- PULL REQUEST TEMPLATE -->
<!-- (Update "[ ]" to "[x]" to check a box) -->

- [ ] The commit message follows our [guidelines](https://github.com/fengyuanchen/compressorjs/blob/main/.github/CONTRIBUTING.md#commit-message-guidelines).
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
**Summary**

## PR Type

What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->
**What kind of change does this PR introduce?** (check at least one)

- [ ] Bugfix
- [ ] Feature
- [ ] Code style update
- [ ] Refactor
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other, Please describe:
- [ ] Docs
- [ ] Build-related changes
- [ ] Other, please describe:

## What is the current behavior?
If changing the UI of the default theme, please provide the **before/after** screenshot:

<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
**Does this PR introduce a breaking change?** (check one)

Issue Number: N/A
- [ ] Yes
- [ ] No

## What is the new behavior?
If yes, please describe the impact and migration path for existing applications:

<!-- Describe what the new behavior would be. -->
**The PR fulfills these requirements:**

## Does this PR introduce a breaking change?
- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)

- [ ] Yes
- [ ] No
You have tested in the following browsers: (Providing a detailed version will be better.)

- [ ] Chrome
- [ ] Firefox
- [ ] Safari
- [ ] Edge
- [ ] IE

If adding a **new feature**, the PR's description includes:

- [ ] A convincing reason for adding this feature
- [ ] Related documents have been updated
- [ ] Related tests have been updated

<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->
To avoid wasting your time, it's best to open a **feature request issue** first and wait for approval before working on it.

## Other information
**Other information:**
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

## 1.0.7 (Nov 28, 2020)

- Update the builtin dependencies for better adaptability.
- Update the built-in dependencies for better adaptability.

## 1.0.6 (Nov 23, 2019)

- Fix the `The operation is insecure` error (#57).

## 1.0.5 (Jan 23, 2019)

- Fix wrong generated URL when the given image's orientation is 1 (#64).
- Fix the wrong generated URL when the given image's orientation is 1 (#64).

## 1.0.4 (Jan 19, 2019)

Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,17 @@ Indicates if read the image's Exif Orientation value (JPEG image only), and then
**Notes:**

- Don't trust this all the time as some JPEG images have incorrect (not standard) Orientation values.
- If the size of target image is too large (e.g., greater than 10 MB), you should disable this option to avoid out-of-memory crash.
- If the size of the target image is too large (e.g., greater than 10 MB), you should disable this option to avoid an out-of-memory crash.
- The image's Exif information will be removed after compressed, so if you need the Exif information, you may need to upload the original image as well.

### maxWidth

- Type: `number`
- Default: `Infinity`

The max width of the output image. The value should be greater than `0`.
The max-width of the output image. The value should be greater than `0`.

> Avoid to get a blank output image, you might need to set the `maxWidth` and `maxHeight` options to limited numbers, because of [the size limits of a canvas element](https://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element), recommend to use `4096` or lesser.
> Avoid getting a blank output image, you might need to set the `maxWidth` and `maxHeight` options to limited numbers, because of [the size limits of a canvas element](https://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element), recommend to use `4096` or lesser.
### maxHeight

Expand All @@ -151,14 +151,14 @@ The max height of the output image. The value should be greater than `0`.
- Type: `number`
- Default: `0`

The min width of the output image. The value should be greater than `0` and should not be greater than the `maxWidth`.
The min-width of the output image. The value should be greater than `0` and should not be greater than the `maxWidth`.

### minHeight

- Type: `number`
- Default: `0`

The min height of the output image. The value should be greater than `0` and should not be greater than the `maxHeight`.
The min-height of the output image. The value should be greater than `0` and should not be greater than the `maxHeight`.

### width

Expand Down Expand Up @@ -227,7 +227,7 @@ PNG files over this value will be converted to JPEGs. To disable this, just set
- `context`: The 2d rendering context of the canvas.
- `canvas`: The canvas for compression.

The hook function to execute before draw the image into the canvas for compression.
The hook function to execute before drawing the image into the canvas for compression.

```js
new Compressor(file, {
Expand All @@ -247,7 +247,7 @@ new Compressor(file, {
- `context`: The 2d rendering context of the canvas.
- `canvas`: The canvas for compression.

The hook function to execute after drew the image into the canvas for compression.
The hook function to execute after drawing the image into the canvas for compression.

```js
new Compressor(file, {
Expand All @@ -266,7 +266,7 @@ new Compressor(file, {
- Parameters:
- `result`: The compressed image (a `File` (**read only**) or `Blob` object).

The hook function to execute when success to compress the image.
The hook function to execute when successful to compress the image.

### error(err)

Expand All @@ -275,7 +275,7 @@ The hook function to execute when success to compress the image.
- Parameters:
- `err`: The compression error (an `Error` object).

The hook function to execute when fail to compress the image.
The hook function executes when fails to compress the image.

[⬆ back to top](#table-of-contents)

Expand All @@ -294,7 +294,7 @@ compressor.abort();

## No conflict

If you have to use other compressor with the same namespace, just call the `Compressor.noConflict` static method to revert to it.
If you have to use another compressor with the same namespace, just call the `Compressor.noConflict` static method to revert to it.

```html
<script src="other-compressor.js"></script>
Expand Down

0 comments on commit b6993fb

Please sign in to comment.