The plugin system in spludo is intended to be as powerful as possible. But it sticks to the convention-over-configuration-approach intact.

There is a plugins repository at the official spludo site.

All plugins are located in the application's plugins folder at myapp/plugins.

Once the plugin is dropped into the plugins folder of the application, the framework will load all views, controllers and libs from the plugins, too.

A plugins folder structure can look for example like this:

myplugin/
    lib/
        index.js
    controllers/
        myplugin-controllers.js
    views/
        MyPluginViewOne.ejs
    etc/
        SomethingInTextFormat.txt

In this case myplugin/lib/index.js will be executed as soon as the application launches (because it's an index.js file within a lib folder).

That index.js file might register validators or data mappers.

All views, controllers and libs are accessible by the core and all other plugins, too! So use the plugin system to modularize and package what can be reused in other projects.

Comments