docs: fix plugin example (export verifyConditions, not verify) (#2192)

plugin example was exporting `verify`, not `verifyConditions`
This commit is contained in:
Justin Dietz 2021-10-18 11:50:50 -07:00 committed by GitHub
parent a50dc996b5
commit 8db804b7dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ We recommend you setup a linting system to ensure good javascript practices are
In your `index.js` file, you can start by writing the following code In your `index.js` file, you can start by writing the following code
```javascript ```javascript
const verifyConditions = require('./src/verify'); const verify = require('./src/verify');
let verified; let verified;
@ -43,12 +43,12 @@ let verified;
* @param {*} pluginConfig The semantic-release plugin config * @param {*} pluginConfig The semantic-release plugin config
* @param {*} context The context provided by semantic-release * @param {*} context The context provided by semantic-release
*/ */
async function verify(pluginConfig, context) { async function verifyConditions(pluginConfig, context) {
await verifyConditions(pluginConfig, context); await verify(pluginConfig, context);
verified = true; verified = true;
} }
module.exports = { verify }; module.exports = { verifyConditions };
``` ```
Then, in your `src` folder, create a file called `verify.js` and add the following Then, in your `src` folder, create a file called `verify.js` and add the following