Closed robinskumar73 closed 8 years ago
Or we should export
the methods which we wants to use in the plugins and and then we can use it by exporting the methods.
Also every plugins must have a onInit
method in which the function which should run which should initialize the plugins.
You cannot use node default method to export methods as. it has a database attachment to method that can only be initialize at run time.
One options is to create a static method in the helper function. var plugin-load = loadPlugin('plugin-name') which will load the required plugins.
Insert a global object inside plugin which other plugin can use to extend its functionality. like