Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

monaca-lib

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monaca-lib

Monaca cloud API bindings for JavaScript

  • 1.1.0-rc.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
129
decreased by-66.41%
Maintainers
1
Weekly downloads
 
Created
Source

Monaca Cloud API

This is a library used to communicate with the Monaca Cloud REST API.

Example usage

var Monaca = require('monaca-lib').Monaca;

var monaca = new Monaca();

monaca.login('some@email.com', 'password').then(
  function() {
    console.log('Succesfully logged in!');

    monaca.cloneProject('PROJECT_ID', '/destination/directory').then(
      function() {
        console.log('Successfully clone project!');
      },
      function(error) {
        console.log('Clone failed: ' + error);
      },
      function(progress) {
        console.log('Downloading ' + progress.path);
      }
    );
  },
  function(error) {
    console.log('Login failed: ' + error);
  }
);

There is also a Localkit class that is used to connect a local development environment to the Monaca Debugger.

var monacaLib = require('monaca-lib'),
  Monaca = monacaLib.Monaca,
  Localkit = monacaLib.Localkit;

var monaca = new Monaca();

var localkit = new Localkit(monaca, '/path/to/project');

localkit.startHttpServer().then(
  function() {
    localkit.startBeaconTransmitter().then(
      function() {
        console.log('Localkit will now wait for connections from the Monaca debugger.');
      }
    );
  }
);

Running tests

To run the tests use the following command:

$ export MONACA_TEST_EMAIL=some@email.org
$ export MONACA_TEST_PASSWORD=password
$ npm test

Building the documentation

The documentation is built using JSDoc. Use the following command in the root directory to build the documentation:

$ jsdoc src

The generated documentation can be found in out/index.html.

Keywords

FAQs

Package last updated on 12 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc