Skip to content

Commit

Permalink
docs(readme): grammatical fixes; http links to https (#122)
Browse files Browse the repository at this point in the history
* docs(readme): grammatical fixes; http links to https

* docs(readme): remove duplicate line
  • Loading branch information
Fdawgs committed Feb 12, 2021
1 parent 4a9d0e7 commit 73e9d99
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ When you build plugins for Fastify and you want that them to be accessible in th
1. Use the `skip-override` hidden property
2. Use this module

__Note: the v2.x & v3.x series of this module covers Fastify v3. For Fastify v2 support refer to the v1.x series.__
__Note: the v2.x & v3.x series of this module covers Fastify v3. For Fastify v2 support, refer to the v1.x series.__

## Usage
`fastify-plugin` can do three things for you:
Expand All @@ -31,10 +31,10 @@ module.exports = fp(function (fastify, opts, next) {
```

## Metadata
In addition if you use this module when creating new plugins, you can declare the dependencies, the name and the expected Fastify version that your plugin needs.
In addition, if you use this module when creating new plugins, you can declare the dependencies, the name, and the expected Fastify version that your plugin needs.

#### Fastify version
If you need to set a bare-minimum version of Fastify for your plugin, just add the [semver](http://semver.org/) range that you need:
If you need to set a bare-minimum version of Fastify for your plugin, just add the [semver](https://semver.org/) range that you need:
```js
const fp = require('fastify-plugin')

Expand All @@ -49,7 +49,8 @@ If you need to check the Fastify version only, you can pass just the version str
You can check [here](https://github.com/npm/node-semver#ranges) how to define a `semver` range.

#### Name
Fastify uses this option to validate dependency graph. On one hand it makes sure that no name collision occurs. On the other hand it makes possible to perform [dependency check](https://github.com/fastify/fastify-plugin#dependencies).
Fastify uses this option to validate the dependency graph, allowing it to ensure that no name collisions occur and making it possible to perform [dependency checks](https://github.com/fastify/fastify-plugin#dependencies).

```js
const fp = require('fastify-plugin')

Expand All @@ -65,7 +66,7 @@ module.exports = fp(plugin, {
```

#### Dependencies
You can also check if the `plugins` and `decorators` which your plugin intend to use are present in the dependency graph.
You can also check if the `plugins` and `decorators` that your plugin intend to use are present in the dependency graph.
> *Note:* This is the point where registering `name` of the plugins become important, because you can reference `plugin` dependencies by their [name](https://github.com/fastify/fastify-plugin#name).
```js
const fp = require('fastify-plugin')
Expand Down Expand Up @@ -138,8 +139,8 @@ fp(async (fastify: FastifyInstance, options: FastifyPluginOptions): Promise<void
## Acknowledgements

This project is kindly sponsored by:
- [nearForm](http://nearform.com)
- [LetzDoIt](http://www.letzdoitapp.com/)
- [nearForm](https://nearform.com)
- [LetzDoIt](https://www.letzdoitapp.com/)

## License

Expand Down

0 comments on commit 73e9d99

Please sign in to comment.