[annotator-dev] Switch to JavaScript?

Randall Leeds tilgovi at hypothes.is
Thu Jun 19 17:03:47 UTC 2014


On Jun 19, 2014 12:17 PM, "Kristof Csillag" <csillag at hypothes.is> wrote:
>
>
> On 2014-06-19 18:03, steph wrote:
>>
>> Hi,
>>
>> On 06/19/2014 10:17 AM, Andrew - FinalsClub wrote:
>>>
>>>
>>> Would we be better served for the time being by adding a few examples
to the documentation showing both vanilla JS and Coffeescript side-by-side
with some guidelines about how someone could write either style and submit
a plugin, patch, or PR?
>>

Examples in both languages is cool. But examples in JS are probably best.

>>
>> Just chiming in on this: It's not a possibility to contribute code in JS
or CoffeeScript. All of the CoffeeScript of the core compiles into the
various JS packages (bundled together or independently), and those compiled
JS versions are not included in the repo.

It's not a possibility and won't be ever (unless we get some futuristic AST
editing tool that can automatically translate both directions) to accept JS
contributions to modules written in coffee.

>
> What you are describing here are just accidental properties of the
current build system.
>
> There is not substantial reason blocking from JS code being combined with
CS code.
>
> It should be easy to add new plugins in separate packages, which contain
100% pure vanilla JS.
> (Especially since moving to the new npm  - based packaging system.)
>

Even the same package.

It's possible today, right now, to add JS modules to the current annotator
repo with no changes. The browserify system is set up such that it doesn't
matter. `require("./foo")` will find foo.js or foo.coffee.

But this isn't a good thing long term. We should probably have a code base
in one language rather than two.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20140619/166bd69a/attachment-0004.html>


More information about the annotator-dev mailing list