How to use the monaca-lib.Localkit function in monaca-lib

To help you get started, we’ve selected a few monaca-lib 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 monaca / monaca-cli / src / sync.js View on Github external
SyncTask.livesync = function() {
  var localkit, nwError = false, projectDir;

  try {
    localkit = new Localkit(monaca, false);
  } catch (error) {
    return monaca
      .reportFail(report, 'Unable to start debug: ' + util.parseError(error))
      .catch(util.fail);
  }

  if (Object.keys(localkit.pairingKeys).length == 0) {
    util.print('');
    util.print('Welcome to Monaca debug - Live-reload and debug in the real device');
    util.print('');
    util.print('To get started, you need to install Monaca Debugger on your phone.')
    util.print('');
    util.print('   For Android Devices: Search and install "Monaca" in Google Play');
    util.print('   For iOS Devices: Search and install "Monaca" in App Store');
    util.print('')
    util.print('After installation, connect your device to the same WiFi network');
github monaca / monaca-cli / src / auth.js View on Github external
AuthTask.logout = function() {
  util.print('Signing out from Monaca Cloud...\n');

  var localkit = new Localkit(monaca);

  return monaca.logout()
    .then(
      function() {
        util.print('You have been signed out.');
        return localkit.clearPairing();
      },
      util.fail.bind(null, 'Unable to sign out: ')
    )
    .then(
      util.print.bind(null, 'Removed Monaca Debugger pairing information.'),
      util.fail.bind(null, 'Unable to remove Monaca Debugger pairing information: ')
    )
};

monaca-lib

Monaca cloud and localkit API bindings for JavaScript

Unrecognized
Latest version published 2 months ago

Package Health Score

65 / 100
Full package analysis