@jswork/next-plugin-manager
v1.0.8
Published
Plugin manager for next.
Readme
next-plugin-manager
Plugin manager for next.
installation
npm install -S @jswork/next-plugin-managerapis
| api | params | description | | ---------- | ---------------- | --------------------------------------------- | | register | inEntity | Add a plugin. | | unregister | inName | Remove a plugin by name. | | enabled | - | Get all enabled plugin. | | disabled | - | Get all disabled plugin. | | enable | inName | Active a plugin. | | disable | inName | Deactive a plugin. | | toggle | inName | Active/Deactive a plugin auto. | | update | inName, inObject | Update a plugin. | | updates | inObject | Update multiple plugins. | | has | inName | Check if a plugin exists. | | set | inName, inEntity | Set plugin to new value. | | get | inName | Get a plugin by name. | | sets | inObject | Multiple set. | | gets | - | Get all registered plugins(include disabled). |
usage
import NxPluginManager from '@jswork/next-plugin-manager';
const manager = NxPluginManager.getInstance();
manager.register();
manager.unregister();
// ...license
Code released under the MIT license.
