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
Your plugin script should come AFTER the main alchemy.js script is loaded.
Your plugin should extend the Alchemy prototype with a callable, for example:
Alchemy.prototype.plugins.somePlugin=function(alchemyInstance){// something amazing happens and it handles all of the // logic to get your plugin loaded and playing nicely with the core Alchemy app}
alchemyInstance contains access to the conf (alchemyInstance.conf) as well as the API methods for that instance (alchemyInstance.get.nodes(), etc.)
Additionally, for your application, you can extend the Alchemy default configurations. If you are using lodash like we do, something like Alchemy::defaults = _.merge({}, controlDashDefaults, Alchemy::defaults). If you do add confs, you may want to write a test that makes sure none of the Alchemy.defaults are getting overwritten. Rather, that you are extending the defaults, so that the user can overwrite specific defaults for your plugin directly.
The text was updated successfully, but these errors were encountered:
including plugins
<script src="path/to/some/alchemyPlugin/somePlugin.js"></script>
writing your own plugin
Basics:
OR
alchemyInstance
contains access to the conf (alchemyInstance.conf
) as well as the API methods for that instance (alchemyInstance.get.nodes()
, etc.)Additionally, for your application, you can extend the Alchemy default configurations. If you are using lodash like we do, something like
Alchemy::defaults = _.merge({}, controlDashDefaults, Alchemy::defaults)
. If you do add confs, you may want to write a test that makes sure none of theAlchemy.defaults
are getting overwritten. Rather, that you are extending the defaults, so that the user can overwrite specific defaults for your plugin directly.The text was updated successfully, but these errors were encountered: