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

Plugin architecture #20

Closed
sirkitree opened this issue Jun 29, 2015 · 4 comments
Closed

Plugin architecture #20

sirkitree opened this issue Jun 29, 2015 · 4 comments

Comments

@sirkitree
Copy link
Contributor

This issue is to discuss a general approach for plugins. Here are my thoughts so far, and as they change through discussion I'll update this original post.

  1. Plugins should be third party node modules which can be installed via npm.
  2. Plugins are installed in a plugins directory and the server.js should auto detect them.
  3. Possible have a list of enabled plugins in config.json (Re: turn config.js into config.json #25)
  4. Plugins should have a few standard functions exposed, like init(). Format and standards to be figured out in the future, but this PR is a good start.

Note that we don't have to start out with this sort of thing, we could include a few standard ones I think and use them to work out the architecture, but I want to allow for others to be able to create their own plugins without needing to actually commit them to this repo.

@sirkitree
Copy link
Contributor Author

The ircjsbot has some interesting plugin architecture: https://github.com/nlogax/ircjsbot

Basically there is a config.json with a plugins variable in which the user can specify which plugins to enable. Then there is a plugins directory which is another repo with a bunch of plugins included as a submodule.

Not sure I like the idea of all plugins being in the same repo, but rather each one being it's own module so that anyone can create and maintain there own, but I could be persuaded if others thought this approach was viable.

@sirkitree
Copy link
Contributor Author

Here's an excellent short presentation on some module patterns: http://darrenderidder.github.io/talks/ModulePatterns/#/

@timschwartz
Copy link
Member

#35

@timschwartz
Copy link
Member

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants