Closed kdvolder closed 11 years ago
There is now a simple plugin loader for client-side scripted plugins.
Essentially, a client-side scripted plugin is an AMD module that gets autoloaded asynchronously by scripted when it starts up.
The module will appear to be a module with a name like this: scripted/plugins/<plugin-name>
.
A plugin is a 'first class' citizen in the sense that it is really not any different from any other AMD module in the client-side scripted code. It can 'require' any other AMD module in the scripted and use the APIs on those modules.
Allthough technically a scripted plugin can load-up any existing client side AMD module with a require call, we don't want to encourage this. Instead the idea is to make specific 'nice to use' apis under 'scripted/api' that will be designed to make writing plugins for various interesting use cases relatively easy.
A few sample plugins already exist:
Provisional apis currently available:
There's much more work to do in cleaning up and fleshing out the loader architecture and the apis but we'll deal with those under separately tracked issues.
Create an 'initial' plugin-loader for client-side scripted plugins.