Open HiraveBapu opened 6 years ago
From your data-distribution
plugin, you can access the services through imports
parameter, and you can store them in a variable in that file (or other), or pass to other classes when require
ing them, for example:
module.exports = function setup(options, imports, register) {
var otherFile = require('./other-file-not-plugin')(imports.service1);
or using something like otherFile.setService(service1)
, that doesn't need to be a plugin.
Lets say i have plugin called "data-distribution" which consumes three services service1, service2,service3. In the "data-distribution" folder / plugin, there are other js files/modules are created. In one of the module of "data-distribution" needs to access "service1", how would it access it ?
so in other words, every single file has to be "plugin" (its own folder with package.json) or can it be some higher level plugin and all other can share the imported services ?