npm-hydra

1.5.5 • Public • Published

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);
	});

Readme

Keywords

Package Sidebar

Install

npm i npm-hydra

Weekly Downloads

0

Version

1.5.5

License

MIT

Last publish

Collaborators

  • devnav