Comparing version 2.8.0-0.10.1 to 2.8.0-0.10.2
@@ -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 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
220189
5898
+ Addedblock-stream@0.0.9(transitive)
+ Addedcordova@2.8.17(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addedfollow-redirects@0.0.7(transitive)
+ Addedfstream@0.1.31(transitive)
+ Addedgraceful-fs@3.0.12(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedms@2.0.0(transitive)
+ Addednatives@1.1.6(transitive)
+ Addedplugman@0.7.11(transitive)
+ Addedstream-consume@0.1.1(transitive)
+ Addedtar@0.1.20(transitive)
- Removedcordova@2.8.15(transitive)
- Removedplugman@0.7.9(transitive)
Updatedcordova@2.8.17