Expoeses shared functionality used by cordova-lib and Cordova platforms. ## Exposed APIs
Represents special instance of NodeJS EventEmitter which is intended to be used to post events to cordova-lib and cordova-cli
var events = events;events
There are the following events supported by cordova-cli:
An error class used by Cordova to throw cordova-specific errors. The CordovaError class is inherited from Error, so CordovaError instances is also valid Error instances (
instanceof check succeeds).
var CordovaError = CordovaError;throw 'Some error message' SOME_ERR_CODE;
See CordovaError for supported error codes.
Exposes functionality to deal with cordova project
config.xml files. For ConfigParser API reference check ConfigParser Readme.
var ConfigParser = ConfigParser;var appConfig = 'path/to/cordova-app/config.xml';console;
PluginInfo is a wrapper for cordova plugins'
plugin.xml files. This class may be instantiated directly or via
PluginInfoProvider. The difference is that
PluginInfo instances based on plugin source directory.
var PluginInfo: PluginInfo;var PluginInfoProvider: PluginInfoProvider;// The following instances are equalvar plugin1 = 'path/to/plugin_directory';var plugin2 = ;console
Utility module for dealing with sequential tasks. Provides a set of tasks that are needed to be done and reverts all tasks that are already completed if one of those tasks fail to complete. Used internally by cordova-lib and platform's plugin installation routines.
var ActionStack = ActionStack;var stack =var action1 = stack;var action2 = stack;stack;stack;stack
Module for spawning child processes with some advanced logic.
var superspawn = superspawn;superspawn
A set of utility methods for dealing with xml files.
var xml = xmlHelpers;var xmlDoc1 = xml;var xmlDoc2 = xml;xml; // doc2 now contains all the nodes from doc1
The APIs listed below are also exposed but are intended to be only used internally by cordova plugin installation routines.
git clone https://git-wip-us.apache.org/repos/asf/cordova-lib.git
npm install && npm link
cd ../cordova-lib && npm link cordova-common && npm install