Skip to content

Commit

Permalink
fix(js plugins): update to use new register function
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderElias authored and Villanuevand committed Jan 20, 2020
1 parent 8d0bbe1 commit a2416df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions extraPlugin/extra-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const extraRoutesPlugin = (route, options) => {
return [];
};

extraRoutesPlugin[configValidator] = async options => {
const validator = async options => {
const errors = [];

if (options.numberOfPages && typeof options.numberOfPages !== 'number') {
Expand All @@ -42,5 +42,5 @@ extraRoutesPlugin[configValidator] = async options => {
return errors;
};

registerPlugin('router', 'extra', extraRoutesPlugin);
registerPlugin('router', 'extra', extraRoutesPlugin, validator);
module.exports.extraRoutesPlugin = extraRoutesPlugin;
4 changes: 2 additions & 2 deletions extraPlugin/tocPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ const tocPlugin = async (html, options) => {
return html;
};

tocPlugin[configValidator] = async config => [];
registerPlugin('render', 'toc', tocPlugin);
const validator = async config => [];
registerPlugin('render', 'toc', tocPlugin, validator);
4 changes: 2 additions & 2 deletions extraPlugin/voidPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ const voidPlugin = async (route, options) => {
return [];
};

voidPlugin[configValidator] = async conf => [];
registerPlugin('router', 'void', voidPlugin);
const validator = async conf => [];
registerPlugin('router', 'void', voidPlugin, validator);

0 comments on commit a2416df

Please sign in to comment.