diff --git a/README.md b/README.md index 71a88b4..ed0ae87 100644 --- a/README.md +++ b/README.md @@ -4,27 +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+``` + +If you want coffeescript support, `npm install -g coffee-script` app.js example: -app.js http://localhost:5984/dbname Commands: push : Push app once to server. sync : Push app then watch local files for changes. -
+```javascript
var couchapp = require('couchapp')
, path = require('path');
@@ -72,4 +74,4 @@ app.js example:
}
couchapp.loadAttachments(ddoc, path.join(__dirname, '_attachments'));
-
+```
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));