I need a plug-in system for my app and I'd like for my user to be able to
install a plug-in by just doing the standard `npm install foo` where foo is
the name of the module.  When my app starts I want to find all plugins for
my app and "require" them without knowing their names.

I'm thinking that any and all modules with a name matching *_myapp_plugin
(I don't know my app's name yet)  would be loaded (required).  The user of
my app would then be able to enable/disable these plugins through the UI.

I considered walking the dir tree looking for node_module folders, but then
I started thinking about all the complications.  Maybe I should steal code
from node require.  Of course if node allowed wild cards in the require
function that would be ideal.

I'd be happy to make this plug-in system a module.  Node doesn't have
enough modules yet.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to