couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Kaufman <anthony.kauf...@gmail.com>
Subject Re: CoffeeScript CommonJS Module Function
Date Mon, 19 Aug 2013 20:18:23 GMT
Hi everyone, I just wanted to check back on this. Any help for me?

On Aug 16, 2013, at 2:10 PM, Jann Horn <jann+couchdb-dev@thejh.net> wrote:

> On Fri, Aug 16, 2013 at 11:07:30PM +0200, Jann Horn wrote:
>> On Fri, Aug 16, 2013 at 02:03:03PM -0700, Anthony Kaufman wrote:
>>> I've been trying to define a CoffeeScript CommonJS Module Function without success.
I can translate the same function into Javascript and it works fine. I'm using CouchDB 1.3.1
on Mac OS X Lion.
>>> 
>>> Here's the CoffeeScript document:
>>> {
>>> 	_id: "_design/test",
>>> 	language: "coffeescript",
>>> 	lib: {
>>> 		say_hello: "exports.callback = (name) -> 'Hello ' + name"
>>> 	}
>>> 	test: {
>>> 		map: "(doc) ->
>>> 	say_hello = require('views/lib/say_hello').callback
>>> 	emit(say_hello(doc._id), doc)"
>>> 	}
>>> }
>> 
>> Isn't the indentation a bit broken there?
> 
> Sorry, nevermind.


Mime
View raw message