Permalink
Browse files

Reorganising module

  • Loading branch information...
1 parent 88e9842 commit 48620b71216e4a217c7d87bb200fdbc824d7b676 @cgiffard committed Jan 16, 2013
View
@@ -0,0 +1 @@
+node_modules
File renamed without changes.
File renamed without changes.
@@ -694,7 +694,4 @@ Crawler.prototype.removeFetchCondition = function(index) {
}
};
-// EXPORTS
-exports.FetchQueue = FetchQueue;
-exports.Cache = Cache;
-exports.Crawler = Crawler;
+module.exports = Crawler;
View
@@ -0,0 +1,9 @@
+// SimpleCrawler
+// Export interfaces
+
+module.exports =
+ module.exports.crawler =
+ require("./crawler.js");
+
+module.exports.queue = require("./queue.js");
+module.exports.cache = require("./cache.js");
@@ -20,6 +20,8 @@ var FetchQueue = function(){
this.scanIndex = {};
};
+module.exports = FetchQueue;
+
FetchQueue.prototype = [];
FetchQueue.prototype.add = function(protocol,domain,port,path,callback) {
callback = callback && callback instanceof Function ? callback : function(){};
@@ -263,6 +265,4 @@ FetchQueue.prototype.defrost = function(filename,callback) {
callback(null,self)
});
-};
-
-exports.queue = FetchQueue;
+};
View
@@ -1,17 +1,34 @@
{
- "name": "simplecrawler",
- "description": "Very straigntforward web crawler. Uses EventEmitter. Generates queue statistics and has a basic cache mechanism with extensible backend.",
- "version": "0.0.10",
- "homepage": "http://github.com/cgiffard/node-simplecrawler",
- "author": "Christopher Giffard <christopher.giffard@cgiffard.com>",
- "keywords": ["crawler","spider","cache","queue","simplecrawler","eventemitter"],
- "repository": {
- "type": "git",
- "url": "http://github.com/cgiffard/node-simplecrawler.git"
- },
+ "name": "simplecrawler",
+ "description": "Very straigntforward web crawler. Uses EventEmitter. Generates queue statistics and has a basic cache mechanism with extensible backend.",
+ "version": "0.1.0",
+ "homepage": "http://github.com/cgiffard/node-simplecrawler",
+ "author": "Christopher Giffard <christopher.giffard@cgiffard.com>",
+ "keywords": [
+ "crawler",
+ "spider",
+ "cache",
+ "queue",
+ "simplecrawler",
+ "eventemitter"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/cgiffard/node-simplecrawler.git"
+ },
"bugs": {
- "url": "https://github.com/cgiffard/node-simplecrawler/issues"
+ "url": "https://github.com/cgiffard/node-simplecrawler/issues"
+ },
+ "main": "./lib/index.js",
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "devDependencies": {
+ "mocha": "~1.8.1",
+ "jshint": "~0.7.x",
+ "chai": "~1.2.0"
},
- "main": "./index.js",
- "engines": { "node" : ">=0.4.0" }
-}
+ "dependencies": {
+ "iconv": "~1.2.4"
+ }
+}
View
No changes.

0 comments on commit 48620b7

Please sign in to comment.