npm-hydra
v1.5.5
Published
hydra npm library
Downloads
4
Readme
npm-hydra
This can be used to compress and upload mobis.
//to install
npm install npm-hydra
var hydra = require('npm-hydra');
//to zip mobi
//updateVersion(loc, newInfo, scb, fcb);
var newInfo = {
"version": '1.7.3',
"newVersionDescription": "just a random version"
};
hydra.updateVersion('./', newInfo, function(zipFile, size){
console.log('Mobi zipped at: ' + zipFile);
console.log('Mobi zip size: ' + size);
}, function(err){
console.log('Failed to zip mobi: ' + err);
});
//to publish mobi
//publish(server, zipFile, scb, fcb);
var server = {
'url': 'server url endpoint',
'key': 'key',
'secret': 'secret'
};
var zipFile = 'location of compressed(zipped) mobi.';
hydra.publish(server, zipFile, function(msg, statusCode){
console.log(msg, statusCode);
}, function(err, errCode){
console.log(err, errCode);
});