Package Exports
- hyper-plugin-extend
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hyper-plugin-extend) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
hyper-plugin-extend
Allows hyper plugins to integrate with eachother.
Usage
Place the following in the main javascript file for each sub-plugin:
var registerSubPlugin = require('hyper-plugin-extend').registerSubPlugin;
var SomePluginClass = require('./somePluginClass.js').SomePluginClass;
exports.onRendererWindow = registerSubPlugin('<SOME PLUGIN NAME>', SomePluginClass);Place the following in the main javascript file for the parent plugin:
var registerParentPlugin = require('hyper-plugin-extend').registerParentPlugin;
exports.onRendererWindow('<SOME PLUGIN NAME>', PluginClass => { /* do something */ })To access a list of all loaded sub-plugins later, do the following:
var getSubPlugins = require('hyper-plugin-extend').getSubPlugins
getSubPlugins('<SOME PLUGIN NAME>') // This returns an array of plugin classesgetSubPlugins relies on the renderer window.