/[Apache-SVN]
ViewVC logotype

Revision 1129600


Jump to revision: Previous Next
Author: jan
Date: Tue May 31 10:08:58 2011 UTC (12 years, 10 months ago)
Changed paths: 10
Log Message:
Add CoffeeScript (http://coffeescript.org/) 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.

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, license.skip and .gitignore files as well as the
build system accordingly.

Changed paths

Path Details
Directorycouchdb/trunk/.gitignore modified , text changed
Directorycouchdb/trunk/LICENSE modified , text changed
Directorycouchdb/trunk/NOTICE modified , text changed
Directorycouchdb/trunk/etc/couchdb/default.ini.tpl.in modified , text changed
Directorycouchdb/trunk/license.skip modified , text changed
Directorycouchdb/trunk/share/Makefile.am modified , text changed
Directorycouchdb/trunk/share/server/coffee-script.js added
Directorycouchdb/trunk/share/server/util.js modified , text changed
Directorycouchdb/trunk/share/www/script/couch_tests.js modified , text changed
Directorycouchdb/trunk/share/www/script/test/coffee.js added

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26