From d52cfe8bace5bae7b0a4266ff019e455ee8ce596 Mon Sep 17 00:00:00 2001
From: Brian Peacock <bpeacock@fastfig.com>
Date: Thu, 8 May 2014 16:34:16 -0500
Subject: [PATCH] Fixed issue publishing unpublished modules

---
 lib/GUI/js/header.js |  1 -
 lib/GUI/js/search.js |  6 +++++-
 lib/local-storage.js | 11 +++++------
 lib/search.js        | 15 +++++----------
 lib/static/main.js   |  9 ++++++---
 5 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/lib/GUI/js/header.js b/lib/GUI/js/header.js
index 79f4e8555..d9f6eea05 100644
--- a/lib/GUI/js/header.js
+++ b/lib/GUI/js/header.js
@@ -24,7 +24,6 @@ $(function() {
 	scrollFunc();
 
 	$(window).resize(function() {
-		console.log('resize');
 		$content.css('margin-top', $header.outerHeight());
 	}).resize();
 });
\ No newline at end of file
diff --git a/lib/GUI/js/search.js b/lib/GUI/js/search.js
index 4cd4a08df..19222140f 100644
--- a/lib/GUI/js/search.js
+++ b/lib/GUI/js/search.js
@@ -1,5 +1,6 @@
 var $ = require('unopinionate').selector,
-	template = require('../entry.hbs');
+	template = require('../entry.hbs'),
+	onScroll = require('onscroll');
 
 $(function() {
 	'use strict';
@@ -63,4 +64,7 @@ $(function() {
 		$input.val('');
 		$form.keyup();
 	});
+
+	
+	
 });
diff --git a/lib/local-storage.js b/lib/local-storage.js
index 15fa2f317..43cbdcfa1 100644
--- a/lib/local-storage.js
+++ b/lib/local-storage.js
@@ -48,7 +48,7 @@ Storage.prototype._internal_error = function(err, file, msg) {
 	})
 }
 
-Storage.prototype.add_package = function(name, package, callback) {
+Storage.prototype.add_package = function(name, info, callback) {
 	this.storage(name).create_json(info_file, get_boilerplate(name), function(err) {
 		if (err && err.code === 'EEXISTS') {
 			return callback(new UError({
@@ -56,13 +56,12 @@ Storage.prototype.add_package = function(name, package, callback) {
 				msg: 'this package is already present'
 			}))
 		}
+
+		search.add(info.versions[info['dist-tags'].latest]);
+		localList.add(name);
+
 		callback()
 	})
-
-	console.log(package);
-
-	search.add(package.versions[package['dist-tags'].latest]);
-	localList.add(name);
 }
 
 Storage.prototype.remove_package = function(name, callback) {
diff --git a/lib/search.js b/lib/search.js
index 95b5410a6..df218beb6 100644
--- a/lib/search.js
+++ b/lib/search.js
@@ -15,16 +15,11 @@ Search.prototype = {
 		return this.index.search(q);
 	},
 	add: function(package) {
-		var self = this;
-
-		this.storage.get_readme(package.name, package.version, function(readme) {
-			self.index.add({
-				id:           package.name,
-				name:         package.name,
-				description:  package.description,
-				author:       package._npmUser.name,
-				readme:       readme
-			});
+		this.index.add({
+			id:           package.name,
+			name:         package.name,
+			description:  package.description,
+			author:       package._npmUser.name
 		});
 	},
 	reindex: function() {
diff --git a/lib/static/main.js b/lib/static/main.js
index e4e774752..82fc2b1c8 100644
--- a/lib/static/main.js
+++ b/lib/static/main.js
@@ -129,7 +129,6 @@ $(function() {
 	scrollFunc();
 
 	$(window).resize(function() {
-		console.log('resize');
 		$content.css('margin-top', $header.outerHeight());
 	}).resize();
 });
@@ -139,7 +138,8 @@ require('./entry');
 require('./header');
 },{"./entry":2,"./header":3,"./search":5}],5:[function(require,module,exports){
 var $ = require('unopinionate').selector,
-	template = require('../entry.hbs');
+	template = require('../entry.hbs'),
+	onScroll = require('onscroll');
 
 $(function() {
 	'use strict';
@@ -203,9 +203,12 @@ $(function() {
 		$input.val('');
 		$form.keyup();
 	});
+
+	
+	
 });
 
-},{"../entry.hbs":1,"unopinionate":16}],6:[function(require,module,exports){
+},{"../entry.hbs":1,"onscroll":14,"unopinionate":16}],6:[function(require,module,exports){
 "use strict";
 /*globals Handlebars: true */
 var base = require("./handlebars/base");