From 977f2ed9bc5bae9e82147ea1e1c1590b7b4b8ef6 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 31 Aug 2011 16:17:56 +1000 Subject: [PATCH 1/2] Added coffeescript support --- README.md | 2 ++ bin.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 71a88b4..8d8b8ed 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ Commands: sync : Push app then watch local files for changes. +If you want coffeescript support, `npm install -g coffee-script` + app.js example:
diff --git a/bin.js b/bin.js
index b415843..6ea30a0 100755
--- a/bin.js
+++ b/bin.js
@@ -6,6 +6,10 @@ var couchapp = require('./main.js')
   , fs = require('fs')
   ;
 
+try {
+  require('coffee-script');
+} catch (e) {}
+
 function abspath (pathname) {
   if (pathname[0] === '/') return pathname
   return path.join(process.env.PWD, path.normalize(pathname));

From e14447ade13924d4cfc6d5d2d0272dba37e4bff6 Mon Sep 17 00:00:00 2001
From: Joseph 
Date: Wed, 31 Aug 2011 16:21:14 +1000
Subject: [PATCH 2/2] Cleaned up markdown in README

---
 README.md | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index 8d8b8ed..ed0ae87 100644
--- a/README.md
+++ b/README.md
@@ -4,29 +4,29 @@ Install node.
 
 Install npm.
 
-
+```
 $ git clone repo
 $ cd node.couchapp.js
 $ npm link .
-
+``` -
+```
 $ couchapp help
 couchapp -- utility for creating couchapps
 
 Usage:
-  couchapp <command> app.js http://localhost:5984/dbname
+  couchapp  app.js http://localhost:5984/dbname
 
 Commands:
   push : Push app once to server.
   sync : Push app then watch local files for changes.
-
+``` If you want coffeescript support, `npm install -g coffee-script` app.js example: -
+```javascript
   var couchapp = require('couchapp')
     , path = require('path');
 
@@ -74,4 +74,4 @@ app.js example:
   }
 
   couchapp.loadAttachments(ddoc, path.join(__dirname, '_attachments'));
-
+```