Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'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;
},
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
//
'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
///
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() {
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();
});
};