Skip to content

Commit 0a5bc36

Browse files
committed
Remove something
1 parent 9ba33b9 commit 0a5bc36

1 file changed

Lines changed: 0 additions & 49 deletions

File tree

index.js

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -24,55 +24,6 @@ var httpServer = "http://127.0.0.1:" + config.port + "/";
2424
String.prototype.repeat = function(count) {
2525
return new Array(count + 1).join(this);
2626
}
27-
/**
28-
* Search Github from the offical website
29-
* Useless
30-
*/
31-
var searchGitHub = function searchGitHub() {
32-
33-
var originalData = require('./ux/WebFrontEndStack.json');
34-
var q = async.queue(function(object, callback) {
35-
36-
if (object.noRequest || object.github || !object.url || /mozilla|wikipedia/.test(object.url)) {
37-
callback(false);
38-
return;
39-
}
40-
41-
console.log("Running " + object.name);
42-
request(object.url, function(err, res, body) {
43-
if (!err && res.statusCode == 200) {
44-
var rep = body.match(/<a.+?href=("|')([a-z:\/]+?github.com.+?)("|')/);
45-
if (rep === null) {
46-
callback(false);
47-
return;
48-
}
49-
object.github = rep[2];
50-
callback(true);
51-
}
52-
});
53-
54-
}, 5);
55-
var addQueue = function addQueue(object) {
56-
q.push(object, function(err) {
57-
if (err) console.log(object.name + " = " + object.github);
58-
});
59-
if (object.children) {
60-
object.children.forEach(function(val) {
61-
addQueue(val);
62-
});
63-
}
64-
};
65-
66-
addQueue(originalData);
67-
q.push({
68-
noRequest: true
69-
}, function() {
70-
console.log(originalData);
71-
console.log(JSON.stringify(originalData));
72-
fs.writeFileAsync("./ux/WebFrontEndStack.json2", JSON.stringify(originalData), "utf-8");
73-
});
74-
75-
}
7627

7728
/**
7829
* Use to build a promise for some fucking async api.

0 commit comments

Comments
 (0)