config = function () { val = val || require(modulePath); if (arguments.length && typeof arguments[arguments.length - 1] === 'function') { // If args exist and the last one is a function, it's the callback. var args = Array.prototype.slice.call(arguments); var cb = args.pop(); val.apply(o, args).done(function(result) {cb(undefined, result);}, cb); } else { val.apply(o, arguments).done(null, function(err){ throw err; }); } }
n/a
create = function () { val = val || require(modulePath); if (arguments.length && typeof arguments[arguments.length - 1] === 'function') { // If args exist and the last one is a function, it's the callback. var args = Array.prototype.slice.call(arguments); var cb = args.pop(); val.apply(o, args).done(function(result) {cb(undefined, result);}, cb); } else { val.apply(o, arguments).done(null, function(err){ throw err; }); } }
n/a
createpackagejson = function () { val = val || require(modulePath); if (arguments.length && typeof arguments[arguments.length - 1] === 'function') { // If args exist and the last one is a function, it's the callback. var args = Array.prototype.slice.call(arguments); var cb = args.pop(); val.apply(o, args).done(function(result) {cb(undefined, result);}, cb); } else { val.apply(o, arguments).done(null, function(err){ throw err; }); } }
n/a
emit = function () { [native code] }
n/a
fetch = function () { val = val || require(modulePath); if (arguments.length && typeof arguments[arguments.length - 1] === 'function') { // If args exist and the last one is a function, it's the callback. var args = Array.prototype.slice.call(arguments); var cb = args.pop(); val.apply(o, args).done(function(result) {cb(undefined, result);}, cb); } else { val.apply(o, arguments).done(null, function(err){ throw err; }); } }
n/a
info = function () { val = val || require(modulePath); if (arguments.length && typeof arguments[arguments.length - 1] === 'function') { // If args exist and the last one is a function, it's the callback. var args = Array.prototype.slice.call(arguments); var cb = args.pop(); val.apply(o, args).done(function(result) {cb(undefined, result);}, cb); } else { val.apply(o, arguments).done(null, function(err){ throw err; }); } }
n/a
install = function () { val = val || require(modulePath); if (arguments.length && typeof arguments[arguments.length - 1] === 'function') { // If args exist and the last one is a function, it's the callback. var args = Array.prototype.slice.call(arguments); var cb = args.pop(); val.apply(o, args).done(function(result) {cb(undefined, result);}, cb); } else { val.apply(o, arguments).done(null, function(err){ throw err; }); } }
n/a
off = function () { [native code] }
n/a
on = function () { [native code] }
...
// Without these arguments, the commands will fail and print the usage anyway.
if (cli_opts.plugins_dir || cli_opts.project) {
cli_opts.plugins_dir = typeof cli_opts.plugins_dir == 'string' ?
cli_opts.plugins_dir :
path.join(cli_opts.project, 'cordova', 'plugins');
}
process.on('uncaughtException', function(error) {
if (cli_opts.debug) {
console.error(error.message, error.stack);
} else {
console.error(error.message);
}
process.exit(1);
});
...
owner = function () { val = val || require(modulePath); if (arguments.length && typeof arguments[arguments.length - 1] === 'function') { // If args exist and the last one is a function, it's the callback. var args = Array.prototype.slice.call(arguments); var cb = args.pop(); val.apply(o, args).done(function(result) {cb(undefined, result);}, cb); } else { val.apply(o, arguments).done(null, function(err){ throw err; }); } }
n/a
platform = function () { val = val || require(modulePath); if (arguments.length && typeof arguments[arguments.length - 1] === 'function') { // If args exist and the last one is a function, it's the callback. var args = Array.prototype.slice.call(arguments); var cb = args.pop(); val.apply(o, args).done(function(result) {cb(undefined, result);}, cb); } else { val.apply(o, arguments).done(null, function(err){ throw err; }); } }
n/a
removeAllListeners = function () { [native code] }
n/a
search = function () { val = val || require(modulePath); if (arguments.length && typeof arguments[arguments.length - 1] === 'function') { // If args exist and the last one is a function, it's the callback. var args = Array.prototype.slice.call(arguments); var cb = args.pop(); val.apply(o, args).done(function(result) {cb(undefined, result);}, cb); } else { val.apply(o, arguments).done(null, function(err){ throw err; }); } }
n/a
uninstall = function () { val = val || require(modulePath); if (arguments.length && typeof arguments[arguments.length - 1] === 'function') { // If args exist and the last one is a function, it's the callback. var args = Array.prototype.slice.call(arguments); var cb = args.pop(); val.apply(o, args).done(function(result) {cb(undefined, result);}, cb); } else { val.apply(o, arguments).done(null, function(err){ throw err; }); } }
n/a
config = function (cli_opts) { plugman.config(cli_opts.argv.remain, function(err) { if (err) throw err; else console.log('done'); }); }
n/a
create = function (cli_opts) { if( !cli_opts.name || !cli_opts.plugin_id || !cli_opts.plugin_version) { return console.log( plugman.help() ); } var cli_variables = {}; if (cli_opts.variable) { cli_opts.variable.forEach(function (variable) { var tokens = variable.split('='); var key = tokens.shift().toUpperCase(); if (/^[\w-_]+$/.test(key)) cli_variables[key] = tokens.join('='); }); } plugman.create( cli_opts.name, cli_opts.plugin_id, cli_opts.plugin_version, cli_opts.path || '.', cli_variables ); }
n/a
createpackagejson = function (cli_opts) { var plugin_path = cli_opts.argv.remain[0]; if(!plugin_path) { return console.log(plugman.help()); } plugman.createpackagejson(plugin_path); }
n/a
info = function (cli_opts) { plugman.info(cli_opts.argv.remain, function(err, plugin_info) { if (err) throw err; else { console.log('name:', plugin_info.name); console.log('version:', plugin_info.version); if (plugin_info.engines) { for(var i = 0, j = plugin_info.engines.length ; i < j ; i++) { console.log(plugin_info.engines[i].name, 'version:', plugin_info.engines[i].version); } } } }); }
n/a
install = function (cli_opts) { if(!cli_opts.platform || !cli_opts.project || !cli_opts.plugin) { return console.log(plugman.help()); } if(cli_opts.browserify === true) { plugman.prepare = require('./prepare-browserify'); } var cli_variables = {}; if (cli_opts.variable) { cli_opts.variable.forEach(function (variable) { var tokens = variable.split('='); var key = tokens.shift().toUpperCase(); if (/^[\w-_]+$/.test(key)) cli_variables[key] = tokens.join('='); }); } var opts = { subdir: '.', cli_variables: cli_variables, fetch: cli_opts.fetch || false, save: cli_opts.save || false, www_dir: cli_opts.www, searchpath: cli_opts.searchpath, link: cli_opts.link, projectRoot: cli_opts.project }; var p = Q(); cli_opts.plugin.forEach(function (pluginSrc) { p = p.then(function () { return plugman.raw.install(cli_opts.platform, cli_opts.project, pluginSrc, cli_opts.plugins_dir, opts); }); }); return p; }
n/a
owner = function (cli_opts) { plugman.owner(cli_opts.argv.remain); }
n/a
platform = function (cli_opts) { var operation = cli_opts.argv.remain[ 0 ] || ''; if( ( operation !== 'add' && operation !== 'remove' ) || !cli_opts.platform_name ) { return console.log( plugman.help() ); } plugman.platform( { operation: operation, platform_name: cli_opts.platform_name } ); }
n/a
publish = function () { events.emit('error', 'The publish functionality is not supported anymore since the Cordova Plugin registry\n' + 'is moving to read-only state. For publishing use corresponding \'npm\' commands.\n\n' + 'If for any reason you still need for \'plugman publish\' - consider downgrade to plugman@0.23.3'); }
n/a
search = function (cli_opts) { plugman.search(cli_opts.argv.remain, function(err, plugins) { if (err) throw err; else { for(var plugin in plugins) { console.log(plugins[plugin].name, '-', plugins[plugin].description || 'no description provided'); } } }); }
n/a
uninstall = function (cli_opts) { if(!cli_opts.platform || !cli_opts.project || !cli_opts.plugin) { return console.log(plugman.help()); } if(cli_opts.browserify === true) { plugman.prepare = require('./prepare-browserify'); } var p = Q(); cli_opts.plugin.forEach(function (pluginSrc) { var opts = { www_dir: cli_opts.www, save: cli_opts.save || false, fetch: cli_opts.fetch || false, projectRoot: cli_opts.project }; p = p.then(function () { return plugman.raw.uninstall(cli_opts.platform, cli_opts.project, pluginSrc, cli_opts.plugins_dir, opts); }); }); return p; }
n/a
unpublish = function (cli_opts) { events.emit('error', 'The publish functionality is not supported anymore since the Cordova Plugin registry\n' + 'is moving to read-only state. For publishing/unpublishing use corresponding \'npm\' commands.\n\n' + 'If for any reason you still need for \'plugman unpublish\' - consider downgrade to plugman@0.23.3'); }
n/a