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

initPlugins parameters object #652

Open
james-owen opened this issue Apr 10, 2019 · 2 comments
Open

initPlugins parameters object #652

james-owen opened this issue Apr 10, 2019 · 2 comments
Labels
8.x Breaking changes for the next major version of Amphora

Comments

@james-owen
Copy link
Member

Is your feature request related to a problem? Please describe.

When initializing plugins, occasionally several arguments are needed, which makes for too many arguments being passed to a single function.

Describe the solution you'd like

The function initPlugins in plugins.js should pass an object to each plugin.

Current:
plugin(router, pluginDBAdapter, publish, sites)

Suggested:
plugin(router, paramsObject)

@james-owen james-owen added the 8.x Breaking changes for the next major version of Amphora label Apr 10, 2019
@james-owen
Copy link
Member Author

Pull request to add a 5th parameter to this function #655

@james-owen
Copy link
Member Author

@pedroalbr Considering getting the params object started now, while we're working with plugins and potentially adding more params. The params would look like this:
plugin(router, pluginDBAdapter, publish, sites, paramsObj)
instead of the current:
plugin(router, pluginDBAdapter, publish, sites, site, [additional params])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.x Breaking changes for the next major version of Amphora
Projects
None yet
Development

No branches or pull requests

1 participant