Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move dep into ./lib/dep

Remove unnecessary root file.
Add package.json file.
  • Loading branch information...
commit cf48101b7cbbf646b0cb9257525bbb387b6863c5 1 parent a488eb9
@isaacs isaacs authored
View
6 README.md
@@ -13,7 +13,7 @@ To use the library, create a new file called `my-couch-adventure.js`:
var
sys = require('sys'),
- couchdb = require('node-couchdb'),
+ couchdb = require('./lib/couchdb.js'),
client = couchdb.createClient(5984, 'localhost'),
db = client.db('my-db');
@@ -85,7 +85,7 @@ Takes the path of a `file` and callback receives a JS object suitable for inline
// r => {"content_type":"text/javascript","data":"dmFyCiAgs...="}
});
-Check `dep/mime.js` for a list of recognized file types.
+Check `lib/dep/mime.js` for a list of recognized file types.
### couchdb.createClient([port, host])
@@ -232,7 +232,7 @@ A convenience wrapper for `saveDoc()` that prefixes the document id with `'_desi
Attaches a `file` to a given `docId`. Available `options`:
* `name`: The name of the attachment. (default: `path.basename(file)`)
-* `contentType`: The content type to associate with this attachment (default: see `dep/mime.js`)
+* `contentType`: The content type to associate with this attachment (default: see `lib/dep/mime.js`)
* `rev`: If the `docId` already exists, you have to supply its current revision.
### db.removeAttachment(docId, attachmentId, docRev)
View
2  index.js
@@ -1,2 +0,0 @@
-// For your convenience
-module.exports = require('./lib/couchdb');
View
4 lib/couchdb.js
@@ -5,8 +5,8 @@ var
fs = require('fs'),
path = require('path'),
querystring = require('querystring'),
- mime = require('../dep/mime'),
- base64 = require('../dep/base64');
+ mime = require('./dep/mime'),
+ base64 = require('./dep/base64');
// Stringify function embedded inside of objects. Useful for couch views
exports.toJSON = function(data) {
View
0  dep/base64.js → lib/dep/base64.js
File renamed without changes
View
0  dep/mime.js → lib/dep/mime.js
File renamed without changes
View
9 package.json
@@ -0,0 +1,9 @@
+{
+ "name" : "node-couchdb",
+ "author" : "Felix Geisendörfer <felix@debuggable.com>",
+ "description" : "A CouchDB module following node.js idioms",
+ "keywords" : ["couch", "couchdb"],
+ "engines" : ["node"],
+ "directories" : { "lib" : "lib" },
+ "main" : "lib/couchdb"
+}
Please sign in to comment.
Something went wrong with that request. Please try again.