Permalink
Browse files

Merge pull request #6 from gsf/cleanup

Clean up and modernization
  • Loading branch information...
2 parents 56f9e33 + 57e0d1d commit 7d60ab1eb4a346509e0d6d3066642da7c96586ae @ncb000gt committed Mar 25, 2013
Showing with 36 additions and 24 deletions.
  1. +2 −0 .gitignore
  2. +13 −7 index.js
  3. +21 −17 package.json
View
@@ -1,2 +1,4 @@
*.swp
*.swo
+
+node_modules
View
@@ -1,9 +1,15 @@
-var elasticsearch = require('./lib/elasticsearch'),
- cluster = require('./lib/cluster'),
- utils = require('./lib/utils'),
- exports = module.exports;
+var Client = require('./lib/elasticsearch');
-exports.createClient = function() {
- return new elasticsearch(arguments);
+function createClient () {
+ return new Client(arguments);
}
-exports.cluster = cluster;
+
+// Make createClient the default function
+exports = module.exports = createClient;
+
+// Expose constructors
+exports.Client = Client;
+exports.Cluster = require('./lib/cluster');
+
+// For backwards compatibility
+exports.createClient = createClient;
View
@@ -1,22 +1,26 @@
{
"name": "elasticsearch",
- "description": "API around the ElasticSearch RESTful API- mostly convenience.",
- "main": "./index",
+ "description": "API around the ElasticSearch RESTful API -- mostly convenience.",
+ "main": "index.js",
"version": "0.1.0",
"author": "Nick Campbell (http://github.com/ncb000gt)",
- "engines": { "node": ">= 0.2.0" },
- "keywords": ["elastic","search","elastic search","elasticsearch","lucene"],
- "repository": {
- "type": "git",
- "url": "http://github.com/ncb000gt/node-elasticsearch.git"
- },
- "licenses": [
- {
- "type": "MIT"
- }
- ],
- "bugs": {
- "web" : "http://github.com/ncb000gt/node-elasticsearch/issues"
- }
+ "engines": {
+ "node": ">= 0.4.0"
+ },
+ "keywords": [
+ "elastic",
+ "search",
+ "elastic search",
+ "elasticsearch",
+ "lucene"
+ ],
+ "repository": "git://github.com/ncb000gt/node-elasticsearch.git",
+ "license": "MIT",
+ "bugs": "http://github.com/ncb000gt/node-elasticsearch/issues",
+ "devDependencies": {
+ "nodeunit": "~0.7.4"
+ },
+ "scripts": {
+ "test": "nodeunit tests/suites"
+ }
}
-

0 comments on commit 7d60ab1

Please sign in to comment.