0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-06 22:40:26 -05:00

Fixed issue publishing unpublished modules

This commit is contained in:
Brian Peacock 2014-05-08 16:34:16 -05:00
parent f74d7cbd3e
commit d52cfe8bac
5 changed files with 21 additions and 21 deletions

View file

@ -24,7 +24,6 @@ $(function() {
scrollFunc(); scrollFunc();
$(window).resize(function() { $(window).resize(function() {
console.log('resize');
$content.css('margin-top', $header.outerHeight()); $content.css('margin-top', $header.outerHeight());
}).resize(); }).resize();
}); });

View file

@ -1,5 +1,6 @@
var $ = require('unopinionate').selector, var $ = require('unopinionate').selector,
template = require('../entry.hbs'); template = require('../entry.hbs'),
onScroll = require('onscroll');
$(function() { $(function() {
'use strict'; 'use strict';
@ -63,4 +64,7 @@ $(function() {
$input.val(''); $input.val('');
$form.keyup(); $form.keyup();
}); });
}); });

View file

@ -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) { this.storage(name).create_json(info_file, get_boilerplate(name), function(err) {
if (err && err.code === 'EEXISTS') { if (err && err.code === 'EEXISTS') {
return callback(new UError({ return callback(new UError({
@ -56,13 +56,12 @@ Storage.prototype.add_package = function(name, package, callback) {
msg: 'this package is already present' msg: 'this package is already present'
})) }))
} }
search.add(info.versions[info['dist-tags'].latest]);
localList.add(name);
callback() callback()
}) })
console.log(package);
search.add(package.versions[package['dist-tags'].latest]);
localList.add(name);
} }
Storage.prototype.remove_package = function(name, callback) { Storage.prototype.remove_package = function(name, callback) {

View file

@ -15,16 +15,11 @@ Search.prototype = {
return this.index.search(q); return this.index.search(q);
}, },
add: function(package) { add: function(package) {
var self = this; this.index.add({
id: package.name,
this.storage.get_readme(package.name, package.version, function(readme) { name: package.name,
self.index.add({ description: package.description,
id: package.name, author: package._npmUser.name
name: package.name,
description: package.description,
author: package._npmUser.name,
readme: readme
});
}); });
}, },
reindex: function() { reindex: function() {

View file

@ -129,7 +129,6 @@ $(function() {
scrollFunc(); scrollFunc();
$(window).resize(function() { $(window).resize(function() {
console.log('resize');
$content.css('margin-top', $header.outerHeight()); $content.css('margin-top', $header.outerHeight());
}).resize(); }).resize();
}); });
@ -139,7 +138,8 @@ require('./entry');
require('./header'); require('./header');
},{"./entry":2,"./header":3,"./search":5}],5:[function(require,module,exports){ },{"./entry":2,"./header":3,"./search":5}],5:[function(require,module,exports){
var $ = require('unopinionate').selector, var $ = require('unopinionate').selector,
template = require('../entry.hbs'); template = require('../entry.hbs'),
onScroll = require('onscroll');
$(function() { $(function() {
'use strict'; 'use strict';
@ -203,9 +203,12 @@ $(function() {
$input.val(''); $input.val('');
$form.keyup(); $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"; "use strict";
/*globals Handlebars: true */ /*globals Handlebars: true */
var base = require("./handlebars/base"); var base = require("./handlebars/base");