Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for async functions to preprocessor option #272

Merged
merged 7 commits into from
Mar 31, 2020

Conversation

EslamHiko
Copy link
Contributor

@EslamHiko EslamHiko commented Mar 30, 2020

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

fixes #264

Breaking Changes

No

Additional Info

@jsf-clabot
Copy link

jsf-clabot commented Mar 30, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alexander-akait
Copy link
Member

@EslamHiko Let's update documentation too

README.md Outdated
| Name | Type | Default | Description |
| :---------------------------------: | :-------------------------: | :------------------------------------------: | :----------------------------------------------: |
| **[`attributes`](#attributes)** | `{Boolean\|Object}` | `true` | Enables/Disables attributes handling |
| **[`preprocessor`](#preprocessor)** | `{Function\|AsyncFunction}` | `undefined` | Allows pre-processing of content before handling |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need AsyncFunction here

},
};
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need AsyncFunction header, just add somehintg like that: You can use async function, for example:

README.md Outdated

You can set the `preprocessor` option as an Asynchronous Function (`AsyncFunction`) instance.
You can also set the `preprocessor` option as an Asynchronous Function (`async Function`) instance.
For example :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid space after :

README.md Outdated
#### `AsyncFunction`

You can set the `preprocessor` option as an Asynchronous Function (`AsyncFunction`) instance.
You can also set the `preprocessor` option as an Asynchronous Function (`async Function`) instance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as an asynchronous function instance.

README.md Outdated
| **[`minimize`](#minimize)** | `{Boolean\|Object}` | `true` in production mode, otherwise `false` | Tell `html-loader` to minimize HTML |
| **[`esModule`](#esmodule)** | `{Boolean}` | `false` | Use ES modules syntax |
| **[`minimize`](#minimize)** | `{Boolean\|Object}` | `true` in production mode, otherwise `false` | Tell `html-loader` to minimize HTML |
| **[`esModule`](#esmodule)** | `{Boolean}` | `false` | Use ES modules syntax |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it is changed, if not new?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I added : in the last of --- under the description table which made the lint centralize the description 😅

@alexander-akait alexander-akait merged commit e59324b into webpack-contrib:master Mar 31, 2020
@EslamHiko EslamHiko deleted the issue-264 branch March 31, 2020 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow preprocessor to be async
3 participants