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.6 to 2.8.1-0.11.0

lib/phonegap/version.js

12

lib/cli/version.js

@@ -5,12 +5,4 @@ /*!

var fs = require('fs'),
path = require('path');
var phonegap = require('../main');
/*!
* Load package.json.
*/
var packagePath = path.join(__dirname, '..', '..', 'package.json'),
packageJSON = JSON.parse(fs.readFileSync(packagePath), 'utf8');
/**

@@ -28,4 +20,4 @@ * $ phonegap version

module.exports = function(argv, callback) {
console.log(packageJSON.version);
console.log(phonegap.version().npm);
callback();
};

@@ -35,2 +35,3 @@ /*!

this.run = require('./phonegap/run').create(this);
this.version = require('./phonegap/version').create(this);
this.local.build = require('./phonegap/local.build').create(this);

@@ -37,0 +38,0 @@ this.local.install = require('./phonegap/local.install').create(this);

@@ -67,4 +67,18 @@ /*!

CreateCommand.prototype.execute = function(options, callback) {
var self = this;
var self = this,
version = self.phonegap.version().phonegap,
uri = 'https://github.com/phonegap/phonegap-app-hello-world/archive/' +
version + '.tar.gz';
// customize default app
cordova.config(options.path, {
lib: {
www: {
id: 'phonegap',
version: version,
uri: uri
}
}
});
// create local project

@@ -78,5 +92,2 @@ cordova.create(options.path, function(e) {

// use phonegap hello world
self.updateProject(options);
self.phonegap.emit('log', 'created project at', options.path);

@@ -86,23 +97,1 @@ callback(null);

};
/**
* Replace Cordova Project with PhoneGap Project.
*
* This function can be removed once cordova-cli supports external projects.
*
* Options:
*
* - `options` {Object}
* - `options.path` {String} is the project path.
*/
CreateCommand.prototype.updateProject = function(options) {
var destinationPath = path.join(options.path, 'www'),
sourcePath = path.join(
__dirname, '..', '..',
'node_modules', 'phonegap-build', 'res', 'project-template', 'www'
);
shell.rm('-r', destinationPath);
shell.cp('-r', sourcePath, options.path);
};
{
"name": "phonegap",
"description": "PhoneGap command-line interface and node.js library.",
"version": "2.8.0-0.10.6",
"version": "2.8.1-0.11.0",
"homepage": "http://github.com/mwbrooks/phonegap-cli",

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

"colors": "0.6.x",
"cordova": "2.8.20",
"cordova": "2.8.23",
"node-static": "0.6.x",

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

@@ -5,3 +5,4 @@ /*

var CLI = require('../../lib/cli'),
var phonegap = require('../../lib/main'),
CLI = require('../../lib/cli'),
cli;

@@ -17,2 +18,7 @@

spyOn(process.stdout, 'write');
spyOn(phonegap, 'version').andReturn({
npm: '2.8.0-0.10.6',
module: '0.10.6',
phonegap: '2.8.0'
});
});

@@ -19,0 +25,0 @@

@@ -21,3 +21,5 @@ /*

};
spyOn(phonegap, 'version').andReturn({ phonegap: '2.8.0' });
spyOn(cordova, 'create');
spyOn(cordova, 'config');
spyOn(shell, 'rm');

@@ -51,2 +53,15 @@ spyOn(shell, 'cp');

it('should use phonegap hello world app', function() {
phonegap.create(options);
expect(cordova.config).toHaveBeenCalledWith(options.path, {
lib: {
www: {
id: 'phonegap',
version: '2.8.0',
uri: jasmine.any(String)
}
}
});
});
it('should try to create a project', function() {

@@ -67,9 +82,2 @@ phonegap.create(options);

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) {

@@ -76,0 +84,0 @@ phonegap.create(options, function(e) {

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