couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Lehnardt (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-817) Natively support coffeescript
Date Sat, 28 May 2011 18:28:47 GMT


Jan Lehnardt commented on COUCHDB-817:

I propose the following patch to be added to trunk and 1.2.0:

I'll reproduce the commit message here:

Add CoffeeScript ( support to the JS view server.

This allows you to write all query server functions in CoffeeScript.

The implementation re-uses the JS query server and adds an additional,
optional compilation step. To make the implementation easier for now,
a new main-coffee.js file is generated that includes the CoffeeScript
compiler, but I think we can do away with that in a future optimisation
and just use a single main.js that can handle both.

The patch includes basic tests for the JS test suite that I tested
in Firefox and Chrome. I'm no expert in CoffeeScript, so I don't
know if more complex script will break the implementation. `make
distcheck` passes.

Futon picks up the "coffeescript" design document lanugage as expected
and view definition interaction works as usual.

The implementation does some sting maniulation on top of the
CoffeeScript compile step that probably can be done more nicely.

List functions don't deal well with the implicit return generated by
CoffeeScript, but J Chris says, this will be easy to fix.

The patch adds CoffeeScript 1.1.1 which is MIT licensed and updates
the NOTICE, license.skip and .gitignore files as well as the build
system accordingly.

> Natively support coffeescript
> -----------------------------
>                 Key: COUCHDB-817
>                 URL:
>             Project: CouchDB
>          Issue Type: New Feature
>            Reporter: Matt Parker
> i'd love to be able to put coffeescript map and reduce function/files directly into my
ddoc, instead of having to compile them first.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message