Is it essential to use a docpad.cson file or can we use a docpad.json instead? In playing around I had noticed that building a docpad.json works to a point. However converting the example CSON for the QueryEngine to a JS object literal blows up when processing the "function" reserved keyword.
# sample docpad.cson works great{
collections:
articles: (database) ->
database.findAllLive({layout: 'article.html.eco'}, {date:-1})
}
# sample docpad.json An error occured: reserved word "function" on line 3 SyntaxError: reserved word "function" on line 3
{
collections : {
articles : function(database){
database.findAllLive({
layout: 'article.html.eco'
}, {date:-1});
}
}
}
Is this happening because the CSON is getting processed by node and returning well formed JSON?
I'm really just curious whether CSON is optional or a hard rule. Its not that I dislike the CSON, actually it's quite nice.