// helper functions

var http = require("http");

exports.urlForLibrary = function (library, file, version) {
  return "//cdnjs.cloudflare.com/ajax/libs/" + library + "/" + version + "/" + file;
};

exports.libraryUrls = function (callback) {
  http.get("http://cdnjs.com/packages.json", function (res) {
    var data = "";
    var chunkNumber = 1;

    res.on("data", function (chunk) {
      data += chunk;
      console.log("chunk " + chunkNumber++);
    });

    res.on("end", function () {
      console.log("done");
      var libraries = JSON.parse(data).packages;
      var result = libraries.map(function (data) {
        return exports.urlForLibrary(data.name, data.filename, data.version);
      });
      callback(result);
    });
  });
};

@@ -306,46 +306,106 @@
     
-var data = %22%22;%0A    var chunkNumber = 1
+console.log(%22Downloading the cdnjs package list... (this might take a minute)%22);%0A    var data = %22%22
 ;%0A%0A 
@@ -466,53 +466,8 @@
 nk;%0A
-      console.log(%22chunk %22 + chunkNumber++);%0A
     
@@ -526,12 +526,13 @@
 og(%22
-d
+D
 one
+!
 %22);%0A

Make the console output for downloading the package list more concise