Stackedit modularization: Plugins folders #595
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
UPDATE 2014-11-04: Need an example for testing, so don't merge until we know it works
To follow up on #542, this branch provides a modularized structure for loading plugins into Stackedit
Usage: PLugins are now defined in the
/public/plugins
folder and are activated one place only: in the filepublic/res/plugins.js
(and only once in this file as opposed to previously)Work done:
public/res/plugins.js
publisher.js
,synchronizer.js
,sharing.js
And it already works as is!
How it works: All plugins are registered in
public/res/plugins.js
, which now loads each of the defined plugins by sending them to Publisher, Synchronizer, Sharing for initialization. After that theonPluginsLoaded
event is submitted.This fully solves the means of #542 but could be improved further so that for instance html snippets relevant for each plugin can be put in that specific directory and loaded only if relevant.