webtides / luna-js

MIT License
8 stars 0 forks source link

Plugin system #64

Open lukas-schardt opened 2 years ago

lukas-schardt commented 2 years ago

Currently luna-js does allow multiple roots for apis, routes and hooks, but they each need to be defined separate.

A plugin system where you can create a JavaScript project containing a luna.config.js which takes care of its own declarations and startup, etc. This plugin now can be added to an existing luna project.

e.g.

...
{
    plugins: [ 'node_modules/my-luna-plugin`, {
        path: `node_modules/different-luna-plugin`,
        prefix: `different-luna-plugin` // Mount the plugin on a different route prefix
   }],
}
...