[annotator-dev] packaging plugins

Kristof Csillag csillag at hypothes.is
Sat Apr 26 17:14:46 UTC 2014

A few more questions.

How do I declare dependencies between plugins? "require()" satisfies the
code dependency, but what I need to check is not the exported objects from
the other plugin, but the presence of the plugin, loaded in the current
annotator instance.

Should I simply manually check @core.plugins.whatever, or is there a better
way to do this?

Also, how do I declare conflicts between mutually exclusive plugins?

Is there a clear, declarative way to do that, or do I have to add runtime
checks for both ends?

2014.04.22. 22:43 ezt írta ("Randall Leeds" <tilgovi at hypothes.is>):

> I haven't done an npm publish from it yet, but in theory it would work.
> The thing that's most notable and least intuitive (needs documentation) is
> the browserify plugin shipping with annotator now. Using `browserify -p
> annotator` causes any require calls for "annotator" will resolve to a
> namespace shim that will find annotator in AMD, CommonJS, or the global
> scope.
> See the Makefile in annotator-annotateit for a complete command line which
> builds the plugin bundle the same way the core plugins are built, which
> results in a UMD module that should work in any environment.
> On Apr 22, 2014 10:27 PM, "Randall Leeds" <tilgovi at hypothes.is> wrote:
>> openannotation/annotator-annotateit
>> On Apr 22, 2014 8:42 PM, "Kristof Csillag" <csillag at hypothes.is> wrote:
>>> Hi,
>>> Is there an example project somewhere which showcases how to properly
>>> package a plugin for Annotator, which lives in an independent
>>> repository, and is released via npm / browserify independently of the
>>> upstream project?
>>> I am talking about an example that showcases the required settings for
>>> the whole toolchain.
>>> Thank you:
>>>      Kristof
>>> _______________________________________________
>>> annotator-dev mailing list
>>> annotator-dev at lists.okfn.org
>>> https://lists.okfn.org/mailman/listinfo/annotator-dev
>>> Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20140426/bf845d44/attachment-0004.html>

More information about the annotator-dev mailing list