How to use the cordova-lib.plugman function in cordova-lib

To help you get started, we’ve selected a few cordova-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 sony / generator-cordova-plugin-devbed / app / index.js View on Github external
'use strict';
var assert = require('assert');
var Q = require('q');
var yeoman = require('yeoman-generator');
var chalk = require('chalk');
var yosay = require('yosay');
var cordova_lib = require('cordova-lib');
var plugman = cordova_lib.plugman;
var cordova = cordova_lib.cordova;

//============================================================================
// CONFIGURE
//
var TEST_FRAMEWORK = 'http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework.git';

//============================================================================
// Yeoman generator implementation
//
module.exports = yeoman.generators.Base.extend({

  constructor: function (args, options, config) {
    yeoman.generators.Base.apply(this, arguments);
    this.props = options;
  },
github sony / generator-cordova-plugin-devbed / _plugin / index.js View on Github external
var assert = require('assert');
var yeoman = require('yeoman-generator');
var fs = require('fs');
var xml2js = require('xml2js');
var cordova_lib = require('cordova-lib');
var plugman = cordova_lib.plugman;

//============================================================================
// Yeoman generator implementation
//
module.exports = yeoman.generators.Base.extend({

  constructor: function (args, options, config) {
    yeoman.generators.Base.apply(this, arguments);
    this.props = options;
  },

  //==========================================================================
  // Create plugin
  //--------------------------------------------------------------------------
  // Run plugman: create plugin
  //
github sony / generator-cordova-plugin-devbed / _plugin_platform / index.js View on Github external
'use strict';
var assert = require('assert');
var yeoman = require('yeoman-generator');
var cordova_lib = require('cordova-lib');
var plugman = cordova_lib.plugman;

//============================================================================
// Yeoman generator implementation
//
module.exports = yeoman.generators.Base.extend({

  constructor: function (args, options, config) {
    yeoman.generators.Base.apply(this, arguments);
    this.props = options;
  },

  //==========================================================================
  // Add platform into plugin
  //--------------------------------------------------------------------------
  /// CWD changed to plugin directory
  ///
github apache / cordova-cli / spec / create.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.
*/

var clicreate = require("../src/create.js"),
    Q = require('q'),
    cordova_lib = require('cordova-lib'),
    plugman = cordova_lib.plugman,
    cordova = cordova_lib.cordova;

describe("cordova cli", function () {

    beforeEach(function () {
        // Event registration is currently process-global. Since all jasmine
        // tests in a directory run in a single process (and in parallel),
        // logging events registered as a result of the "--verbose" flag in
        // CLI testing below would cause lots of logging messages printed out by other specs.
        spyOn(cordova, "on");
        spyOn(plugman, "on");
    });

    describe("Create Module", function () {

        describe("parseConfig", function() {
github axemclion / react-native-cordova-plugin / cli / android-cli.js View on Github external
Android.prototype.add = function (plugin, variables) {
    this.init();
    var self = this;
    var plugmanConsumableVariables = mapVariablesToObject(variables);
    return cordova.plugman.raw.install('android', PLATFORM_DIR, plugin, path.resolve(this.projectRoot, 'node_modules'), {
        platformVersion: '5.0.0',
        //TODO - figure out a way to make cordova browserify only to selectively pick files
        browserify: false,
        cli_variables: plugmanConsumableVariables
    }).then(function () {
        return generateCordovaJs(self.projectRoot);
    }).then(function () {
        return prepBuildFiles();
    });
};