How to use the cordova-common.PluginManager function in cordova-common

To help you get started, we’ve selected a few cordova-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / cordova-ios / tests / spec / unit / Api.spec.js View on Github external
with the License.  You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 */

const path = require('path');
const fs = require('fs');
const EventEmitter = require('events');
const PluginManager = require('cordova-common').PluginManager;
const Api = require('../../../bin/templates/scripts/cordova/Api');
const check_reqs = require('../../../bin/templates/scripts/cordova/lib/check_reqs');

// The lib/run module pulls in ios-sim, which has a hard requirement that it
// be run on a Mac OS - simply requiring the module is enough to trigger the
// environment checks. These checks will blow up on Windows + Linux.
// So, conditionally pull in the module, and conditionally test the `run`
// method (more below).
let run_mod;
if (process.platform === 'darwin') {
    run_mod = require('../../../bin/templates/scripts/cordova/lib/run');
}

const projectFile = require('../../../bin/templates/scripts/cordova/lib/projectFile');
const BridgingHeader_mod = require('../../../bin/templates/scripts/cordova/lib/BridgingHeader.js');
const Podfile_mod = require('../../../bin/templates/scripts/cordova/lib/Podfile');
github katzer / cordova-plugin-badge / platforms / ios / cordova / Api.js View on Github external
KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/

/* jslint node: true */

var fs = require('fs');
var path = require('path');
var unorm = require('unorm');
var projectFile = require('./lib/projectFile');
var check_reqs = require('./lib/check_reqs');
var CordovaError = require('cordova-common').CordovaError;
var CordovaLogger = require('cordova-common').CordovaLogger;
var events = require('cordova-common').events;
var PluginManager = require('cordova-common').PluginManager;
var Q = require('q');
var util = require('util');
var xcode = require('xcode');
var ConfigParser = require('cordova-common').ConfigParser;

function setupEvents (externalEventEmitter) {
    if (externalEventEmitter) {
        // This will make the platform internal events visible outside
        events.forwardEventsTo(externalEventEmitter);
    } else {
        // There is no logger if external emitter is not present,
        // so attach a console logger
        CordovaLogger.get().subscribe(events);
    }
}
github katzer / cordova-plugin-badge / platforms / android / cordova / Api.js View on Github external
http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/

var path = require('path');
var Q = require('q');

var AndroidProject = require('./lib/AndroidProject');
var AndroidStudio = require('./lib/AndroidStudio');
var PluginManager = require('cordova-common').PluginManager;

var CordovaLogger = require('cordova-common').CordovaLogger;
var selfEvents = require('cordova-common').events;

var PLATFORM = 'android';

function setupEvents (externalEventEmitter) {
    if (externalEventEmitter) {
        // This will make the platform internal events visible outside
        selfEvents.forwardEventsTo(externalEventEmitter);
        return externalEventEmitter;
    }

    // There is no logger if external emitter is not present,
    // so attach a console logger
    CordovaLogger.get().subscribe(selfEvents);
github apache / cordova-windows / template / cordova / Api.js View on Github external
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/

var path = require('path');
var events = require('cordova-common').events;
var JsprojManager = require('./lib/JsprojManager');
var PluginManager = require('cordova-common').PluginManager;
var CordovaLogger = require('cordova-common').CordovaLogger;
var PlatformMunger = require('./lib/ConfigChanges.js').PlatformMunger;
var PlatformJson = require('cordova-common').PlatformJson;
var PluginInfo = require('./lib/PluginInfo').PluginInfo;
var ConfigParser = require('./lib/ConfigParser');
var PluginInfoProvider = require('cordova-common').PluginInfoProvider;

var PLATFORM = 'windows';

function setupEvents (externalEventEmitter) {
    if (externalEventEmitter) {
        // This will make the platform internal events visible outside
        events.forwardEventsTo(externalEventEmitter);
        return;
    }
github maishumaishu / ChiTuStore2 / user / platforms / android / cordova / Api.js View on Github external
http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/

var path = require('path');
var Q = require('q');

var AndroidProject = require('./lib/AndroidProject');
var AndroidStudio = require('./lib/AndroidStudio');
var PluginManager = require('cordova-common').PluginManager;

var CordovaLogger = require('cordova-common').CordovaLogger;
var selfEvents = require('cordova-common').events;

var PLATFORM = 'android';


function setupEvents(externalEventEmitter) {
    if (externalEventEmitter) {
        // This will make the platform internal events visible outside
        selfEvents.forwardEventsTo(externalEventEmitter);
        return externalEventEmitter;
    }

    // There is no logger if external emitter is not present,
    // so attach a console logger
github ionicthemes / ionic-google-login / platforms / android / cordova / Api.js View on Github external
http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/

var path = require('path');
var Q = require('q');

var AndroidProject = require('./lib/AndroidProject');
var AndroidStudio = require('./lib/AndroidStudio');
var PluginManager = require('cordova-common').PluginManager;

var CordovaLogger = require('cordova-common').CordovaLogger;
var selfEvents = require('cordova-common').events;

var PLATFORM = 'android';


function setupEvents(externalEventEmitter) {
    if (externalEventEmitter) {
        // This will make the platform internal events visible outside
        selfEvents.forwardEventsTo(externalEventEmitter);
        return externalEventEmitter;
    }

    // There is no logger if external emitter is not present,
    // so attach a console logger
github apache / cordova-ios / bin / templates / scripts / cordova / Api.js View on Github external
KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/

/* jslint node: true */

const fs = require('fs');
const path = require('path');
const unorm = require('unorm');
const projectFile = require('./lib/projectFile');
const check_reqs = require('./lib/check_reqs');
const CordovaError = require('cordova-common').CordovaError;
const CordovaLogger = require('cordova-common').CordovaLogger;
const events = require('cordova-common').events;
const PluginManager = require('cordova-common').PluginManager;
const Q = require('q');
const util = require('util');
const xcode = require('xcode');
const ConfigParser = require('cordova-common').ConfigParser;

function setupEvents (externalEventEmitter) {
    if (externalEventEmitter) {
        // This will make the platform internal events visible outside
        events.forwardEventsTo(externalEventEmitter);
    } else {
        // There is no logger if external emitter is not present,
        // so attach a console logger
        CordovaLogger.get().subscribe(events);
    }
}
github sozialhelden / wheelmap-frontend / platforms / ios / cordova / Api.js View on Github external
KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/

/* jslint node: true */

var fs = require('fs');
var path = require('path');
var unorm = require('unorm');
var projectFile = require('./lib/projectFile');
var check_reqs = require('./lib/check_reqs');
var CordovaError = require('cordova-common').CordovaError;
var CordovaLogger = require('cordova-common').CordovaLogger;
var events = require('cordova-common').events;
var PluginManager = require('cordova-common').PluginManager;
var Q = require('q');
var util = require('util');
var xcode = require('xcode');
var ConfigParser = require('cordova-common').ConfigParser;

function setupEvents (externalEventEmitter) {
    if (externalEventEmitter) {
        // This will make the platform internal events visible outside
        events.forwardEventsTo(externalEventEmitter);
    } else {
        // There is no logger if external emitter is not present,
        // so attach a console logger
        CordovaLogger.get().subscribe(events);
    }
}
github apache / cordova-android / bin / templates / cordova / Api.js View on Github external
http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/

var path = require('path');
var Q = require('q');

var AndroidProject = require('./lib/AndroidProject');
var PluginManager = require('cordova-common').PluginManager;

var CordovaLogger = require('cordova-common').CordovaLogger;
var selfEvents = require('cordova-common').events;
var ConfigParser = require('cordova-common').ConfigParser;

var PLATFORM = 'android';

function setupEvents (externalEventEmitter) {
    if (externalEventEmitter) {
        // This will make the platform internal events visible outside
        selfEvents.forwardEventsTo(externalEventEmitter);
        return externalEventEmitter;
    }

    // There is no logger if external emitter is not present,
    // so attach a console logger
github QuickBlox / quickblox-javascript-sdk / samples / cordova / video_chat / platforms / android / cordova / Api.js View on Github external
http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/

var path = require('path');
var Q = require('q');

var AndroidProject = require('./lib/AndroidProject');
var AndroidStudio = require('./lib/AndroidStudio');
var PluginManager = require('cordova-common').PluginManager;

var CordovaLogger = require('cordova-common').CordovaLogger;
var selfEvents = require('cordova-common').events;

var PLATFORM = 'android';


function setupEvents(externalEventEmitter) {
    if (externalEventEmitter) {
        // This will make the platform internal events visible outside
        selfEvents.forwardEventsTo(externalEventEmitter);
        return externalEventEmitter;
    }

    // There is no logger if external emitter is not present,
    // so attach a console logger