You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.
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 ?
The text was updated successfully, but these errors were encountered:
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 requireing 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.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 ?
The text was updated successfully, but these errors were encountered: