-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Plugin Architecture #185
Comments
Would love to see this happen as well. Let me know if there is anything I can do to help out. |
++ |
Thanks for the offer guys, we're definitely planning to open up Keystone with a plugin architecture and help on this would be great. @dboskovic you're right, that's exactly why we transitioned to modular field UI files. The top three things we'd like to make available are:
Would definitely appreciate help getting it expedited, and happy for suggestions on how best to get it done. I'll put some more thought into what needs to be done too and post it here soon too. On a related note, I'd also like to follow up on #165 and implement generic stores behind the file and image fields so we don't end up with a whole lot of duplicate code, which we will if each storage system / service has its own field types. |
@JedWatson Have you given more thought to a plugin architecture? Im looking for some guidance before I continue working on some modules/features Ive been extending into Keystone for my own projects such as 2-factor authentication, better wysiwyg image upload/management, reports, etc. Ive been playing with different ways of doing this but Im still rather new to Keystone so I know they aren't addressing the big picture. I be willing to spend some time implementing plugins If I had a better idea of how you expect to extend/override the core Keystone object. I have tried a simple integration here, but its obviously sloppy and doesnt cover all the bases. Though it does give access to the // Pre-route middleware
this._pre.routes.forEach(function(fn) {
try {
app.use(fn);
}
catch(e) {
if (keystone.get('logger')) {
console.log('Invalid pre-route middleware provided');
}
throw e;
}
});
// Plugins go here
if (this.get('plugins').length) {
console.log('Loading plugins...');
this.get('plugins').forEach(function (plugin) {
var options = {};
if (typeof plugin !== 'string') {
options = plugin.options || {};
plugin = plugin.name;
}
try {
require(plugin)(keystone, options);
} catch(e) {
console.log('Invalid plugin configured or not installed, please check.');
throw e;
}
});
}
// Route requests
app.use(app.router); Let me know your thoughts and if you have anything already started I can help expand upon. Thanks for your hard work! |
Continuing discussion on issue #912 ... |
@JedWatson @bladey @JossMackison
I'm absolutely loving working with Keystone. I'd be very interested in helping to develop out a plugin API and directory. This would open up Keystone to user-contributed admin functionality.
I noticed a transition to modularizing the different field's UI files... Is this something you're planning? If so, are you interested in my contribution to help expedite it? If not, let's discuss it here further to decide on a pattern and I can work on it and then issue a PR.
The text was updated successfully, but these errors were encountered: