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

phonegap

Package Overview
Dependencies
Maintainers
1
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phonegap - npm Package Compare versions

Comparing version 2.8.0-0.10.1 to 2.8.0-0.10.2

44

lib/phonegap/create.js

@@ -62,2 +62,25 @@ /*!

/*!
* Execute.
*/
CreateCommand.prototype.execute = function(options, callback) {
var self = this;
// create local project
cordova.create(options.path, function(e) {
if (e) {
self.phonegap.emit('error', e);
callback(e);
return;
}
// use phonegap hello world
self.updateProject(options);
self.phonegap.emit('log', 'created project at', options.path);
callback(null);
});
};
/**

@@ -84,22 +107,1 @@ * Replace Cordova Project with PhoneGap Project.

};
/*!
* Execute.
*/
CreateCommand.prototype.execute = function(options, callback) {
// create local project
try {
cordova.create(options.path);
// use phonegap hello world
this.updateProject(options);
this.phonegap.emit('log', 'created project at', options.path);
callback(null);
}
catch(e) {
this.phonegap.emit('error', e);
callback(e);
}
};
{
"name": "phonegap",
"description": "PhoneGap command-line interface and node.js library.",
"version": "2.8.0-0.10.1",
"version": "2.8.0-0.10.2",
"homepage": "http://github.com/mwbrooks/phonegap-cli",

@@ -30,3 +30,3 @@ "repository": {

"colors": "0.6.x",
"cordova": "2.8.15",
"cordova": "2.8.17",
"node-static": "0.6.x",

@@ -33,0 +33,0 @@ "optimist": "0.3.x",

@@ -52,3 +52,6 @@ /*

phonegap.create(options);
expect(cordova.create).toHaveBeenCalledWith(options.path);
expect(cordova.create).toHaveBeenCalledWith(
options.path,
jasmine.any(Function)
);
});

@@ -58,5 +61,14 @@

beforeEach(function() {
cordova.create.andReturn();
cordova.create.andCallFake(function(path, callback) {
callback(null);
});
});
it('should use PhoneGap Hello World app', function(done) {
phonegap.create(options, function(e) {
expect(shell.cp).toHaveBeenCalled();
done();
});
});
it('should trigger called without an error', function(done) {

@@ -72,4 +84,4 @@ phonegap.create(options, function(e) {

beforeEach(function() {
cordova.create.andCallFake(function(path) {
throw new Error('path already exists');
cordova.create.andCallFake(function(path, callback) {
callback(new Error('path already exists'));
});

@@ -76,0 +88,0 @@ });

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